Closed zhukic closed 5 years ago
The first step here is to use leave_untranslated_blank YES
option in your job config plus a replace_strings
plugin that will clean up empty nodes from localized files.
There's one test in Serge that does just that, so you can use it as a recipe: https://github.com/evernote/serge/tree/master/t/data/engine/parse_android/01-cleanup-untranslated
The approach above uses regular expressions to clean up the localized files and can be applied not only to Android XML resource files. As of recently, we also got an apply_xslt
plugin that can change the shape of XML files to achieve the same result. One of its tests also shows how to remove untranslated strings from Android resource files:
https://github.com/evernote/serge/tree/master/t/data/engine/apply_xslt/02
Everything works fine! @iafan, thanks a lot for the quick response and your help.
Also thanks for such amazing tool!
Hi. I use Serge in my Android-project. So at first I'm trying to run
serge-import
to create initial translation memory database. After that I runserge localize
and as the result of that untranslated strings appear in the output file with source translation. For example if I have a source file:And initial output file:
After
serge localize
untranslated string appears in English:Is it possible to prevent that because Android system can use default string from source file if there is no corresponding translated string? My config file:
Thanks.