Comments (3)
I'm in IRC (nickname: iafan
) during most of the day (I'm in PDT /GMT-7/ time zone). Feel free to ping me whenever you see me online.
Serge is not a tool to convert between different file formats. iOS and Android apps are usually pretty different, so there's no 100% match in strings. For example, strings with placeholders would be different for iOS and Android, unless you use some custom cross-platform format for placeholders.
Though one can technically write a plugin that would do the conversion at the time you run serge localize
, I'd suggest doing such format conversion outside the Serge localization workflow. It can be a script that takes one android XML file and generates one corresponding .strings file at the specified path. You can take Serge's Android XML parser code as a base for this script.
Once you have the .strings file generated from your XML files, you can localize them with Serge the way I showed before — Serge will reuse translations there just fine.
from serge.
We have little common day time. (I'm in GMT+8/ time zone)
I found that parse_android plugin parse into "key:item", but ios project use array this way : key[0], key[1], key[2] , how could ios key[0] format reuse the android translation with "key:item" format?
android xml code
<string-array name="day_of_week">
<item>"Mon"</item>
<item>"Tue"</item>
<item>"Wed"</item>
<item>"Thu"</item>
<item>"Fri"</item>
<item>"Sat"</item>
<item>"Sun"</item>
</string-array>
ios strings code
/* */
"day_of_week[0]" = "Mon";
/* */
"day_of_week[1]" = "Tue";
/* */
"day_of_week[2]" = "Wed";
/* */
"day_of_week[3]" = "Thu";
/* */
"day_of_week[4]" = "Fri";
/* */
"day_of_week[5]" = "Sat";
/* */
"day_of_week[6]" = "Sun";
from serge.
Mapping of Android<=>iOS keys is totally up to you (and your conversion script). Serge only uses keys as hints (comments that provide additional context to translators). Even if your keys differ, Serge will still reuse the translations.
from serge.
Related Issues (20)
- parse_php_xhtml: add an ability to fine-tune the list of tags processed by default
- Serge always prints debug output on CI. HOT 1
- Qt Text Id based (ts files) HOT 5
- Localized file generation failed HOT 5
- Typo bug: DROP index items_file_id_string_id after CREATE HOT 1
- Add support for computed properties in parse_js parser
- Optimizations prevent reusing translations on existing unmodified files
- Cannot use env variable on boolean property
- Serge surprisingly cuts file name. HOT 3
- transliterate option of test_language plugin should not modify printf() parameter fields
- [Question] Are there any examples (e.g. GitLab CI)?
- Support multiple source files in single XLIFF file HOT 1
- Each <trans-unit> sets "approved=yes" for untranslated strings HOT 3
- parse nginx.conf bug,include not support wildcard HOT 1
- While put the mouse on (Notebooks section) we are unable to place mouse directly on scroll bar, please increase the mouse scroll width like how the size it as page right hand side up and down scroll bar size.
- Parse MD file
- run_command for jobs with several destination_languages dont change %OUTFILE% variable HOT 1
- export_to_ttx is not including the translated text
- Docs no longer easily accessible HOT 1
- Ownership transfer request HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serge.