This project is a fastlane plugin. To get started with fastlane-plugin-google_sheet_localize
, add it to your project by running:
fastlane add_plugin google_sheet_localize
Creates .strings files for iOS and strings.xml files for Android
to use our plugin you have to duplicate this google sheet: Example
Google Drive access token: Guide
- The language_titles (the columns which should be exported)
- The default_language (If a string is not present in a specific language, this is the fallback)
- The base_language (The language which is placed in the base values folder)
English: Mario ate a %2s %1s
.
German: Mario hat %1s einen %2s gegessen
.
In this case %2s
stands for Apple and %1s
for Today, the order is different in this example, so we need to take care of it.
Mapped iOS: Mario ate a %2$@ %1$@
.
Mapped Android: Mario ate a %2s %1s
.
Mapped Web: Mario ate a {2} {1}
.
one|%d artist
other|%d artists
["Monday", "Tuesday", "Wednesday"]
In order to support Objective-C, the plugin provides the support_objc
argument, which is default false
.
Therefore, if you need Objective-C support pass support_objc: true
.
lane :localize do
google_sheet_localize(service_account_path: "./fastlane/google_drive_credentials.json",
sheet_id: "sheet id",
platform: "ios",
tabs: ["3TV"], #array of tab titles in google sheet
localization_path: "./Kit/TVKit",
language_titles: ["de", "en"], #language titles in google sheet
default_language: "de", #default language for google sheet
base_language: "en") #ios: Base.lproj android: values
end
To run both the tests, and code style validation, run
rake
To automatically fix many of the styling issues, use
rubocop -a
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.