-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Translation attempted: No source language files found. No input files found #193
Comments
@frankrei Thank you for reporting this issue. Please note that it's not recommended to use the "vanilla" configuration path. As stated in the README, it is a good idea to provide any |
Hi, I have played around with all the options ad-naseum before opening the ticket. While totally understandable, the lack of documentation/ samples meant that I wasn't really certain what is supposed to go into the In the end though, Bartycrouch finds all the string files with just the vanially config so I left that. I do not have In this particular case I had about a hundred pairs like:
in the I tried setting the A further complicating factor is that the xcode project itself dates back over a decade since before Base internationalization became and option and was migrated by Xcode several releases ago. The assumptions of where assets are located have probably changed quite a lot since those days. Any help would be appreciated. |
This is note entirely correct, the
But having that said, you may be right regarding if the Next:
Yes, I think you were certainly using Base internationalization the wrong way the whole time and it just happened to be working, at least regarding any documentation I have seen from Apple. See also the discussion in #144 and this thread and links in there on the Apple Developer forums. Base internationalization is only for Storyboards & XIB files and if you support English, you should have a en.lproj folder with a strings file in there. Think about it conceptually: Leaving English translations in the Base.lproj within Storyboard/XIB files will make your translators/wording correctors directly work on those files, but they should only work on strings files. More specifically, Base doesn't make any sense for So I suggest you replace any Strings files within the Base.lproj folders with en.lproj and only use Base for Storyboards & XIB files and even for those, you add a en.lproj translation for the English localization. You can view the Base file language as "non-language", so you could even use pseudo-localization values there to check for any length issues within Interface Builder. Note that as a hacky workaround you could actually specify "Base" as your development language on BartyCrouch, but then while translating BartyCrouch would send "Base" as the language identifier to Microsoft Translator as it can't know what the actual language is and things would not work. I hope this helps. |
Hi, I'm sorry if I came across as aggressive; it was certainly not my intention. I very much appreciate both the effort put into Bartycrouch and you taking the time to respond to my bug report. I had totally overlooked the paths examples. My bad. I'm well aware of my lack of expertise in localization. I only started shipping localizations a few years back and do the translation work to German and French myself. At the time, Apple was promoting its new XLIFF workflow, so that's what I adopted. This involves exporting the entire project's localizable resources to a huge file hierarchy of which in reality only the single xml XLIFF file is particulaly relevant. My workflow is simply to export the XLIFF, use the POEdit XLIFF editor with built-in automatic translation support and multi-project translation database to do the translation, then re-import the XLIFF. Xcode takes care of the entire string extraction from xib, storyboards (which I don't use), tables and in-code localizable strings, then puts them back where they belong on re-import. Despite the fact that the XLIFF export always exports the development language as well as one or more languages to be translated, it does not on re-import create any I realize that this is very different from directly working with I would be quite happy with my XLIFF workflow if it weren't for the fact that Xcode is incredibly buggy in that regard. For a long time, Xcode crashed on re-import (a bug in the diff view that the import creates) and there is currently no way of exporting anything short of the entire project.. so if you have 4 targets (as in this project) that "share" the same strings, you get the same string 4 times in the exported XLIFF which is pretty tiresome as well. Most of all though, while the XLIFF export is worth it when there are big changes, it is complete overkill when all you want to do is add a single new localized string. Importing, exporting & editing for two languages easily takes 10 minutes of busiwork.. when it works.. thus my interest in Bartycrouch. I got it to do the basic I can get a translation by using
but it won't work unless I pass in the subscription region with Do I need to go back and create a different Azure trial with a North American region? or is there some way of passing the region parameter into the Your help is very much appreciated. |
I have spent an hour or so experimenting and trying to understand what's going. I have "hacked" the region identifier into the
and the translation is now working for me. Even though I haven't ever worked with any of the packages that you use, I can pretty much see how to add a "region" option. I haven't ever contributed to an open-source project and I'm not sure how any of that works, but if you'd like I can have a go at contributing passing this additional parameter in; I think there's another open bug report (#191) that would be resolved by this. If I understand correctly you do not currently support automatically adding keys to tables when a call to Leaving philosophical choices aside, for my purposes, it would be ideal if I could configure bartycrouch so that:
Experimenting with the configuration options, I can either get the string title to appear in all I presume that this is because Have a nice weekend. |
@frankrei Feel free to post a PR with your additional option, would be great if it also resolved #191. Yes, BartyCrouch currently doesn't seem to support Regarding your configuration wish, did you alredy read the linked blog post or the Localization Workflow section in the README? That's the approach BartyCrouch was designed for. But if you really want to stick to your approach, again I can only ask you if you actually read the README because the "Options for code" toggle in the Update section states that you have this option which does what you want, I think:
Please consider actually reading the documentation next time before reporting issues and if you have questions, consider asking them on a question & answer site like StackOverflow. This is not a Q&A forum. See for example this thread which I answered there and is I think related to this one also, explaining stuff around the Base localization. I'm closing this issue as it's mostly about usage and the only actual issue here is that the documentation wasn't optimized for your use case but is rather more general. Thank you for your understanding and for any PRs that improve this repo for everyone! |
Are we absolutely certain about this? Note the bold sections from this Apple Documentation:
I'm new to localization and just throwing this out there, but wouldn't this suggest that you have the translation for the development language directly in the .xib/.storyboard files inside the Base.lproj folder? I feel like that would make so much more sense from a workflow perspective as well. You build the interface files in a real language - the development language. And then any further languages you add via .strings files. Instead of building the UI in some pseudo 'base' language, and then having the extra effort of translating from the pseudo language to the development language via a strings file. |
@noah-nuebling The section you quote has a screenshot right before it where you can see only a The reason "Base localization" was introduced is right the opposite: Without In other words: There's no need for a "pseudo language" to be involved, even when the developers develop in English, the final user-facing Strings might still need to be checked and adjusted by someone else who's not a developer. Or from a tool that integrates with your project that uploads all Strings to a website where they can be edited etc. Apples is also pretty clear on this right at the start of the documentation site you quoted:
I hope this helps. If you have more questions, feel free to ask. |
Thanks a lot for your clarification @Jeehut! I went the route of using the "Base" language interface builder files directly when the apps' language is set to English by just not providing an English The strucure is a little weird but it alleviates me of some extra work. So far it all seems to be working fine and Do you think I'll run into any issues with this approach? |
@noah-nuebling Well, BartyCrouch's linting and normalizing features won't work properly without a |
I haven't noticed issues so far with keeping the |
I have a fairly non-standard setup for a macOS project with multiple targets.
My config file is "vanilla":
running the update task outputs:
Indicating that the Localizable.strings files are found just fine, but then the 'Normalize' and 'Translate' tasks don't seem to be finding anything.
The ‘/Users/frankreiff/Dropbox/git/abfa4/Resources/Distribution/fr.lproj/Localizable.strings‘ file has hundreds of empty translations. All the other xib and .strings files are all already localized in French and German.
I'm sure I'm missing something.. just not sure what :-)
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: