github.com/rakutentech/cli@v6.12.5-0.20151006231303-24468b65536e+incompatible/cf/i18n/README-i18n.md (about) 1 # README for CF CLI Localization 2 3 __td;lr The Cloud Foundry cli is ready to be translated to one of the supported languages. See "How you can contribute" to help in this effort.__ 4 5 The CloudFoundry (CF) Command Line Interface (CLI) has been internationalized (i18n) and is now ready for localization (l10n). 6 7 This README details what features are available, what are not, how you can contribute, when, as well as the overarching goals we had in mind as we entered this massive update of the CLI. 8 9 ## What? 10 11 The CF CLI is perhaps the most user-facing component of any CF environment. Every user of CF at some point will use the CLI to interact with a specific CF PaaS that they are targeting, be it private or public. 12 13 As CF is a global operating system for clouds, it only made sense for it to be accessible to the many countries all over the world, where English, may not be the best language of communication. 14 15 The CF CLI i18n effort enabled the CLI so that all strings that are used to communicate with the end-user are ready to be translated in the user's native tongue or in some other language that is close to that native tongue. So a French Canadian user can use the CLI in French (fr_FR) and Portuguese user can use the CLI in Brazilian Portuguese (pt_BR). 16 17 Note: Translations only affect messages generated by the CLI. Responses from server side components (Cloud Controller, etc.) will be internationalized seperately and are likely to be English only at the time of this writing. 18 19 User locale is set using the cf config --locale option 20 21 ## When? 22 23 Available today are: 24 25 1. A version of the CLI that is enabled for translation. Going forward, all other versions of the CLI will maintain that i18n enablement. This means that any new strings added to the system will follow i18n enablement guideline, e.g., use Go-style templates and use `T()` functions call to load translated strings. 26 27 2. Default language is English in the the en_US locale. This means that any user for any locale will either have strings for their locale loaded, if they exist, otherwise will default to English, specifically the en_US locale. So for instance, a Great Britain user with locale en_GB will default to en_US since there are no en_GB translations. 28 29 3. Complete versions of French (fr_FR), Chinese-Simplified (zh_Hans), Spanish (es_ES), and Portugese-Brazil (pt_BR). Many thanks to all the hard work from the people that contributed! We welcome fixes to any of these translations. See next sections on how to contribute. 30 31 4. Defaulting of language and territory when a specific translation for a territory does not exist. So for instance, a French Canadian speaker with fr_CA locale will have the fr_FR translation strings loaded instead of en_US since that is the closest translation strings to their language and locale. 32 33 ## How can you contribute? 34 35 1. __Give it a test drive.__ Download the latest CLI and try it in your locale. You should always at least see no difference since English is the default locale if your current locale does not have any translations yet. If your locale is any of the translated locales, then you should see that the CLI strings are in that language. If you run into error, please submit an issue on Github. 36 37 2. __Submit pull requests for languages files with translations/improvements.__ If you see typos, grammar errors, ambiguous strings or lingering English then please find the appropriate string in the `cf/i18n/resources/<language>_<locale>.all.json` and submit a PR with the fix(es). It is much better to submit small pull requests as you complete translations, rather than submitting one giant pull request after you finish everything. This makes it much easier to rapidly merge your changes in. You can also report translations needing fixes as an issue in Github, but if you do understand the language, we would really appreciate the fix. 38 39 ### Note on contributing translations 40 41 It is very important that you DO NOT change the `id` sections of the JSON files---simply said, do not change any of the `id` strings, but only the `translation` strings. See the French locale translations as examples. 42 43 ``` 44 [ 45 { 46 "id":"Create an org", 47 "translation":"Créez un org" 48 }, 49 ... 50 ] 51 ``` 52 53 Finally, it is also important not to translate the argument names in templated strings. Templated strings are the ones which contain arguments, e.g., `{{.Name}}` or `{{.Username}}` and so on. The arguments can move to a different location on the translated string, however, the arguments cannot change, should not be translated, and should not be removed or new ones added. So for instance, the following string is translated in French as follows: 54 55 ``` 56 [ 57 ..., 58 { 59 "id": "Creating quota {{.QuotaName}} as {{.Username}}...", 60 "translation": "Créez quota {{.QuotaName}} étant {{.Username}}..." 61 }, 62 ... 63 ] 64 ``` 65 66 ## Goals 67 68 Our goal is to have translations for the following languages first: 69 70 | Language | Locale | Status | 71 |-----------------------|--------|-------------------------| 72 | English | en_US | Complete | 73 | French | fr_FR | Complete | 74 | Spanish | es_ES | Complete | 75 | German | de_DE | English files ready(*) | 76 | Italian | it_IT | English files ready | 77 | Japanese | ja_JA | English files ready | 78 | Portuguese (Brazil) | pt_BR | Complete | 79 | Chinese (simplified) | zh_Hans | Complete | 80 | Chinese (traditional) | zh_Hant | English files ready | 81 82 If you are interested in submitting translations for another language/locale, then please communicate with us via VCAP-DEV mailing list first. 83 84 (*) We note "English files ready" to mean that our github project contains English versions for the translation files. We are ready for PRs on these files with actual translated strings.