README.md in crowdin-cli-0.4.1 vs README.md in crowdin-cli-0.4.2
- old
+ new
@@ -66,10 +66,12 @@
* `%original_file_name%` - Original file name
* `%android_code%` - Android Locale identifier used to name "values-" directories
* `%original_path%` - Take parent folders names in Crowdin project to build file path in resulted bundle
* `%file_extension%` - Original file extension
* `%file_name%` - File name without extension
+ * `%osx_code%` - OS X Locale identifier used to name ".lproj" directories
+ * `%osx_xliff%` - OS X Locale used to name xliff files (i.e. uk.xliff)
Example for Android projects:
```
/values-%android_code%/%original_file_name%
```
@@ -118,10 +120,29 @@
-
source: /locale/en/**/*.po
translation: /locale/%two_letters_code%/**/%original_file_name%
```
+### API Credentials from environment variables
+
+You could load the API Credentials from an environment variable, e.g.
+
+```
+api_key_env: 'CROWDIN_API_KEY'
+project_identifier_env: 'CROWDIN_PROJECT_ID'
+
+```
+
+If mix, `api_key` and `project_identifier` have priority:
+
+```
+api_key_env: CROWDIN_API_KEY # Low priority
+project_identifier_env: CROWDIN_PROJECT # Low priority
+api_key: xxx # High priority
+project_identifier: yyy # Hight priority
+```
+
### Split project configuration and user credentials
The `crowdin.yaml` file contains project-specific configuration and user credentials(`api_key`, `project_identifier`).
This means that you can't commit this file in the code repository, because the API key would leak to other users. `crowdin-cli` allow 2 configuration files:
@@ -190,10 +211,30 @@
base_url: https://api.crowdin.com
base_path: /path/to/your/project
preserve_hierarchy: true
```
+### [I Have No Idea How To Call This Section]
+
+This add support for 2 optional parameters in the yaml file section: `dest` and `type`.
+This is useful typically for some projects, where the uploaded name must be different so Crowdin can detect the type correctly.
+`dest` allows you to specify a file name on Crowdin.
+**NOTE**: `dest` only works for single files. Don't try to use it with patterns (multiple files).
+
+Configuration sample is below:
+
+```
+files
+ -
+ source: '/conf/messages'
+ dest: '/messages.properties'
+ translation: '/conf/messages.%two_letters_code%'
+ type: 'properties'
+
+
+```
+
### Escape quotes for `.properties` file format
Defines whether single quote should be escaped by another single quote or backslash in exported translations.
You can add `escape_quote: <value>` per-file option.
Acceptable values are: 0, 1, 2, 3. Default is 3.
@@ -374,8 +415,8 @@
## License and Author
Author: Anton Maminov (anton.maminov@gmail.com)
-Copyright: 2012-2014 [crowdin.com](http://crowdin.com/)
+Copyright: 2012-2015 [crowdin.com](http://crowdin.com/)
This project is licensed under the MIT license, a copy of which can be found in the LICENSE file.