|
| 1 | +# |
| 2 | +# This is the crowdin-cli configuration for this repository that allow to keep in sync ALA and crowdin translations in both directions. |
| 3 | +# |
| 4 | +# Currently github integration only allows to configure one repo, so we need to use crowdin-cli to keep in sync serveral githubs repos with one crowdin project. |
| 5 | +# |
| 6 | +# To use it this, you need to configure two vars: |
| 7 | +# |
| 8 | +# export CROWDIN_BASE_PATH=$(dirname $PWD) |
| 9 | +# export CROWDIN_API_KEY=XXXXXX |
| 10 | +# |
| 11 | +# You can get the API from https://crowdin.com/project/ala-i18n/settings#api |
| 12 | +# CROWDIN_BASE_PATH is the parent directory of this repository. |
| 13 | +# |
| 14 | +# After installing crowdin in your computer, to download translations from crowdin run: |
| 15 | +# crowdin download |
| 16 | +# or a specific language with: |
| 17 | +# crowdin download --language es-ES |
| 18 | +# so you can later commit the changes to github. |
| 19 | +# |
| 20 | +# You can update messages.properties in crowdin with: |
| 21 | +# crowdin upload sources |
| 22 | +# and the translations (if there are some change in the repository that needs to be updated in crowdin), for instance to update Japanese language: |
| 23 | +# crowdin upload translations -l ja |
| 24 | +# |
| 25 | +# Note: Right now `crowdin-cli download` downloads files of non translated languages with empty lines and comments, so as a workround, you can run this bash snippet to delete these empty files prior to git commit the changes: |
| 26 | +# for i in $(ls grails-app/i18n/messages_*) ; do SIZE=$(cat $i | egrep -v "^#|^$" | wc -c); if [[ $SIZE -eq 0 ]] ; then rm $i; fi ; done |
| 27 | +# |
| 28 | +# Also you will get some warning like "Warning: Downloaded translations do not match current project configuration. The following files will be omitted" for the rest of repository translations files. |
| 29 | +# |
| 30 | +# More info: |
| 31 | +# |
| 32 | +# - https://support.crowdin.com/cli-tool/ |
| 33 | +# - https://support.crowdin.com/configuration-file/ |
| 34 | + |
| 35 | +# |
| 36 | +# Configuration |
| 37 | +# |
| 38 | +# Your crowdin's credentials |
| 39 | + |
| 40 | +# |
| 41 | +"project_identifier" : "ala-i18n" |
| 42 | +"api_key_env" : CROWDIN_API_KEY |
| 43 | +"base_path_env": CROWDIN_BASE_PATH |
| 44 | + |
| 45 | +# "api_key" : "foo" |
| 46 | +# "base_path" : "" |
| 47 | +# "base_url" : "" |
| 48 | + |
| 49 | +# |
| 50 | +# Choose file structure in crowdin |
| 51 | +# e.g. true or false |
| 52 | +# |
| 53 | +"preserve_hierarchy": true |
| 54 | + |
| 55 | +# |
| 56 | +# Files configuration |
| 57 | +# |
| 58 | +files: [ |
| 59 | + { |
| 60 | + # |
| 61 | + # Source files filter |
| 62 | + # e.g. "/resources/en/*.json" |
| 63 | + # |
| 64 | + "source" : "/spatial-service/grails-app/i18n/messages.properties", |
| 65 | + |
| 66 | + # |
| 67 | + # where translations live |
| 68 | + # e.g. "/resources/%two_letters_code%/%original_file_name%" |
| 69 | + # |
| 70 | + "translation" : "/spatial-service/grails-app/i18n/messages_%locale_with_underscore%.properties", |
| 71 | + |
| 72 | + "translation_replace" : { |
| 73 | + "af_ZA": "af", |
| 74 | + "ar_SA": "ar", |
| 75 | + "ca_ES": "ca", |
| 76 | + "cs_CZ": "cs", |
| 77 | + "da_DK": "da", |
| 78 | + "de_DE": "de", |
| 79 | + # "de_LU": "de", |
| 80 | + "el_GR": "el", |
| 81 | + "en_CA": "en", |
| 82 | + "en_US": "en", |
| 83 | + "es_ES": "es", |
| 84 | + "es_MX": "es", |
| 85 | + "eu_ES": "eu", |
| 86 | + "fi_FI": "fi", |
| 87 | + "fr_CA": "fr", |
| 88 | + "fr_FR": "fr", |
| 89 | + "fr_LU": "fr", |
| 90 | + "gl_ES": "gl", |
| 91 | + "he_IL": "he", |
| 92 | + "hu_HU": "hu", |
| 93 | + "it_IT": "it", |
| 94 | + "ja_JP": "ja", |
| 95 | + "ko_KR": "ko", |
| 96 | + "lb_LU": "lb", |
| 97 | + "nl_NL": "nl", |
| 98 | + "no_NO": "no", |
| 99 | + "pl_PL": "pl", |
| 100 | + # "pt_BR": "pt", |
| 101 | + # "pt_PT": "pt", |
| 102 | + "ro_RO": "ro", |
| 103 | + "ru_RU": "ru", |
| 104 | + "sr_SP": "sr", |
| 105 | + "sv_SE": "sv", |
| 106 | + "tr_TR": "tr", |
| 107 | + "uk_UA": "uk", |
| 108 | + "vi_VN": "vi", |
| 109 | + "zh_CN": "zh" |
| 110 | + # "zh_TW": "zh" |
| 111 | + }, |
| 112 | + |
| 113 | + # |
| 114 | + # files or directories for ignore |
| 115 | + # e.g. ["/**/?.txt", "/**/[0-9].txt", "/**/*\?*.txt"] |
| 116 | + # |
| 117 | + #"ignore" : [], |
| 118 | + |
| 119 | + # |
| 120 | + # The dest allows you to specify a file name on Crowdin |
| 121 | + # e.g. "/messages.json" |
| 122 | + # |
| 123 | + "dest" : "/spatial-service/messages.properties", |
| 124 | + |
| 125 | + # |
| 126 | + # File type |
| 127 | + # e.g. "json" |
| 128 | + # |
| 129 | + #"type" : "", |
| 130 | + "type" : "properties", |
| 131 | + |
| 132 | + # |
| 133 | + # The parameter "update_option" is optional. If it is not set, translations for changed strings will be lost. Useful for typo fixes and minor changes in source strings. |
| 134 | + # e.g. "update_as_unapproved" or "update_without_changes" |
| 135 | + # |
| 136 | + "update_option" : "update_as_unapproved", |
| 137 | + |
| 138 | + # |
| 139 | + # Start block only for XML |
| 140 | + # |
| 141 | + |
| 142 | + # |
| 143 | + # Defines whether to translate tags attributes. |
| 144 | + # e.g. 0 or 1 (Default is 1) |
| 145 | + # |
| 146 | + # "translate_attributes" : 1, |
| 147 | + |
| 148 | + # |
| 149 | + # Defines whether to translate texts placed inside the tags. |
| 150 | + # e.g. 0 or 1 (Default is 1) |
| 151 | + # |
| 152 | + # "translate_content" : 1, |
| 153 | + |
| 154 | + # |
| 155 | + # This is an array of strings, where each item is the XPaths to DOM element that should be imported |
| 156 | + # e.g. ["/content/text", "/content/text[@value]"] |
| 157 | + # |
| 158 | + # "translatable_elements" : [], |
| 159 | + |
| 160 | + # |
| 161 | + # Defines whether to split long texts into smaller text segments. |
| 162 | + # e.g. 0 or 1 (Default is 1) |
| 163 | + # |
| 164 | + # "content_segmentation" : 1, |
| 165 | + |
| 166 | + # |
| 167 | + # End block only for XML |
| 168 | + # |
| 169 | + |
| 170 | + # |
| 171 | + # Start .properties block |
| 172 | + # |
| 173 | + |
| 174 | + # |
| 175 | + # Defines whether single quote should be escaped by another single quote or backslash in exported translations. |
| 176 | + # e.g. 0 or 1 or 2 or 3 (Default is 3) |
| 177 | + # 0 - do not escape single quote; |
| 178 | + # 1 - escape single quote by another single quote; |
| 179 | + # 2 - escape single quote by backslash; |
| 180 | + # 3 - escape single quote by another single quote only in strings containing variables ( {0} ). |
| 181 | + # |
| 182 | + |
| 183 | + "escape_quotes" : 3, |
| 184 | + |
| 185 | + # |
| 186 | + # End .properties block |
| 187 | + # |
| 188 | + |
| 189 | + # |
| 190 | + # Often software projects have custom names for locale directories. crowdin-cli allows you to map your own languages to be understandable by Crowdin. |
| 191 | + # |
| 192 | + "languages_mapping" : { |
| 193 | + "locale_with_underscore" : { |
| 194 | + "af_ZA": "af", |
| 195 | + "ar_SA": "ar", |
| 196 | + "ca_ES": "ca", |
| 197 | + "cs_CZ": "cs", |
| 198 | + "da_DK": "da", |
| 199 | + "de_DE": "de", |
| 200 | + # "de_LU": "de", |
| 201 | + "el_GR": "el", |
| 202 | + # "en_CA": "en", |
| 203 | + "en_US": "en", |
| 204 | + "es_ES": "es", |
| 205 | + "es_MX": "es", |
| 206 | + "eu_ES": "eu", |
| 207 | + "fi_FI": "fi", |
| 208 | + "fr_CA": "fr", |
| 209 | + "fr_FR": "fr", |
| 210 | + "fr_LU": "fr", |
| 211 | + "gl_ES": "gl", |
| 212 | + "he_IL": "he", |
| 213 | + "hu_HU": "hu", |
| 214 | + "it_IT": "it", |
| 215 | + "ja_JP": "ja", |
| 216 | + "ko_KR": "ko", |
| 217 | + "lb_LU": "lb", |
| 218 | + "nl_NL": "nl", |
| 219 | + "no_NO": "no", |
| 220 | + "pl_PL": "pl", |
| 221 | + # "pt_BR": "pt", |
| 222 | + # "pt_PT": "pt", |
| 223 | + "ro_RO": "ro", |
| 224 | + "ru_RU": "ru", |
| 225 | + "sr_SP": "sr", |
| 226 | + "sv_SE": "sv", |
| 227 | + "tr_TR": "tr", |
| 228 | + "uk_UA": "uk", |
| 229 | + "vi_VN": "vi", |
| 230 | + "zh_CN": "zh" |
| 231 | + #"zh_TW": "zh" |
| 232 | + } |
| 233 | + } |
| 234 | + |
| 235 | + # |
| 236 | + # Does the first line contain a header? |
| 237 | + # e.g. true or false |
| 238 | + # |
| 239 | + #"first_line_contains_header" : true, |
| 240 | + |
| 241 | + # |
| 242 | + # for spreadsheets |
| 243 | + # e.g. "identifier,source_phrase,context,uk,ru,fr" |
| 244 | + # |
| 245 | + # "scheme" : "", |
| 246 | + } |
| 247 | +] |
0 commit comments