How to Upload a Project in Android Studion on Github
Crowdin Android Studio Plugin
This plugin lets you integrate your Android project with Crowdin. It enables you to upload new source strings to the organization instantly as well as download translations or source strings from your Crowdin projection.
Also, it allows you to track your Crowdin project translation and proofreading progress directly from the IDE
The plugin is compatible with all the JetBrains IDE'due south such as PHPStorm, IntelliJ Thought and other
Condition
Getting started
- Install plugin via JetBrains Plugin repository.
- Plugin automatically detects the file with sources strings. If changed, the file volition be updated in Crowdin itself.
- Source file tin too be manually uploaded to Crowdin via menu
Tools > Crowdin > Upload Sourcesor only selectUpload to Crowdinoption using the Correct Mouse clicking on the file. - To upload translations employ card
Tools > Crowdin > Upload Translations. - To download translations utilize carte du jour
Tools > Crowdin > Download Translations.
Configuration
Credentials
To get-go using this plugin, create a file with project credentials named crowdin.properties in the root directory of the projection.
projection-id=your-project-identifier api-token=your-api-token project-id - This is a project numeric id
api-token - This is a personal admission token. Tin be generated in your Account Settings
If you are using Crowdin Enterprise, you also need to specify base of operations-url:
base of operations-url=https://{organization-name}.crowdin.com Also, yous could load the credentials from environment variables:
project-id-env=CROWDIN_PROJECT_ID api-token-env=CROWDIN_TOKEN base-url-env=CROWDIN_BASE_URL If mixed, project-id, api-token and base-url are prioritized:
project-id-env=CROWDIN_PROJECT_ID # Low priority api-token-env=CROWDIN_TOKEN # Low priority base of operations-url-env=CROWDIN_URL # Low priority project-id=your-project-identifier # High priority api-token=your-api-token # High priority base of operations-url=https://{system-name}.crowdin.com # High priority Source files and translations
Default behaviour
By default, plugin searches for a source file by **/values/strings.xml pattern, and for translation files past /values-%android_code%/%original_file_name% design.
sources parameter
If there are multiple source files in the aforementioned values directory, or if source file has a unlike name, it can be specified in sources parameter:
sources=file1.xml, file2.xml By default, plugin works as if sources parameter were specified like this:
For such a parameter, the passed names are substituted into the **/values/<source_file> pattern, while for translations the pattern remains standard – /values-%android_code%/%original_file_name%.
files.#.(source|translation) parameters
For more than flexibility, there is files.# parameter.
files.source=/values/*.xml files.translation=/values-%android_code%/%original_file_name% files.1.source=/another/path/*.xml files.1.translation=/another/path-%android_code%/%original_file_name% Example of having multiple source files with the same name:
preserve-hierarchy=true files.source=**/values/strings.xml files.translation=/values-%two_letters_code%/%original_file_name% files.1.source=app/src/primary/res/values/file.xml files.one.translation=app/src/main/res/values-%android_code%/%original_file_name% files.2.source=ext/src/main/res/values/file.xml files.2.translation=ext/src/main/res/values-%android_code%/%original_file_name% Note: Both .source and .translation parts should exist specified
Note: If preserve-hierarchy is set to truthful, plugin adds path to your translation pattern.
preserve-bureaucracy=true files.source=**/values/strings.xml files.translation=/values-%two_letters_code%/%original_file_name% #Correct # this will exist transformed to 'app/src/main/res/values-%two_letter_code%/%original_file_name%' consign pattern for each file Placeholders
Encounter the Placeholders article to put advisable variables.
Annotation: %android_code% placeholder ways a format such as 'fr-rCA' (<ISO 639-1> -r<ISO 3166-1-alpha-two>). When applying format with only two-letter of the alphabet language lawmaking such equally 'fr'(<ISO 639-1>) format, use %two_letters_code% placeholder.
Note: Currently %original_path% placeholder is non supported.
Boosted options
For Android Studio projects that use a git VCS, the plugin will automatically create corresponding branches in Crowdin. If you exercise non employ branches feature in Crowdin, utilize disable-branches parameter:
To prevent automatic file upload to Crowdin use motorcar-upload:
If your project contains multiple modules you want to localize with the same source files naming you lot need to use the post-obit selection:
To attach labels to the uploaded strings use labels:
labels= chief-menu, awarding # Applies to default behavior, `sources' parameter # and all filegroups that exercise not have such a configuration files.1.labels=help-menu # For a specific filegroup, loftier priority files.ii.labels=android # For a specific filegroup, high priority To specify excluded target languages employ excluded-target-languages:
excluded-target-languages= uk, fr # Applies to default beliefs, `sources` parameter # and all filegroups that do not have such a configuration files.1.excluded-target-languages=uk # For a specific filegroup, high priority files.ii.excluded-target-languages=fr # For a specific filegroup, high priority Seeking Assistance
If you find any problems or would like to suggest a feature, delight read the How tin can I contribute section in our contributing guidelines.
Need help working with Crowdin Android Studio Plugin or take any questions? Contact Customer Success Service.
Contributing
If y'all want to contribute please read the Contributing guidelines.
Authors
- Ihor Popyk (ihor.popyk@crowdin.com)
- Yevheniy Oliynyk (evgen41293@gmail.com)
- Daniil Barabash (dbarabash42@gmail.com)
License
The Crowdin Android Studio Plugin is licensed under the MIT License. Come across the LICENSE.md file distributed with this work for additional information regarding copyright ownership. Except equally contained in the LICENSE file, the name(due south) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written dominance.
liedtkebostersair89.blogspot.com
Source: https://github.com/crowdin/android-studio-plugin
0 Response to "How to Upload a Project in Android Studion on Github"
Post a Comment