NCC 1701 communication tool
Create a root level config.json
file:
{
"locales" : [
"fr",
{"lang": "es", "region": "ES"}
],
"layers" : {
"android": {
"path" : "/Users/juliancontreras/awesome-app/src/main/res/"
}
}
}
bundle exec ruby universal_translator.rb -read-existing-android
This will print out the existing language translations for the project.
This guide assumes you're using the android
layer.
- Run
bundle exec ruby universal_translator.rb -generate-android
- Take the file in
untranslated_sheets/input_sheet_*.csv
into the Google Sheets step.
- Import the
input_sheet_1.csv
into a blank sheets page. - You can remove translations by just removing the row. It's fine if the input keys don't match the output keys exactly. The emojis you see are for newline preservation 😏.
- Paste this formula in the empty cells to force a translation.
=GOOGLETRANSLATE($B2, "en", C$1)
Start at cell C2
and just paste into the rest.
3. Export to a folder in this repo called "translated_sheets" with the filename "output_sheet_1.csv"
- Download as CSV to
translated_sheets/output_sheet_1.csv
- Run
bundle exec ruby universal_translator.rb -apply-android
- Enjoy