README 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. This is the directory where all translations should go.
  2. Translations are loaded for a given term at three levels:
  3. 1) default
  4. 2) <Language>
  5. 3) <Language> <Locale/Variant>
  6. Developers who are adding a new feature should add new strings *only* to
  7. default. This file should be comprised of basic English text. It will be used
  8. in the event that there are no more specific languages specified. Once you
  9. have modified default, you should run ./tools/generateTranslationDiffs (Bash
  10. script) which will re-generate the localizations with commented out additions
  11. which you have just added.
  12. Translators should in general implement the <Language> file. This is the
  13. generic translation for a given language; for instance, 'French', 'German',
  14. 'Norsk', etc. If a string exists in this file (and the user has specified this
  15. language), then RawTherapee will override the value in default with the value
  16. in <Language>. Please note that the filename for this file must not contain
  17. any spaces.
  18. In some situations, translations may differ based on region, locale, etc. A
  19. good example of this is the difference in spelling between 'color' (American
  20. English) and 'colour' (British English). In this case, the vast majority of
  21. strings are identical between English and English (UK); however, to keep the
  22. proper spelling in Britain, we have a locale file called 'English (UK)' which
  23. contains the differences between the two. RawTherapee uses locale files when:
  24. a) The user has selected a language which has a space in the file name
  25. b) There is another file which is identical to the locale file up until the
  26. space (i.e., 'English' to the locale file 'English (UK)').
  27. If a locale file is used, it is applied in the same manner as <Language> is to
  28. default. The locale will override any keys present from the ones in the
  29. language file (and in turn, the default).
  30. After the generateTranslationDiffs has been run, all untranslated terms for
  31. a given language/locale will exist at the end of the file, prefixed by a !
  32. comment marker. Translators should go through this section of the file and
  33. translate all terms which they can. After you have translated a line, just
  34. remove the ! comment marker. Comments may be included using the #xx comment
  35. marker, where xx is a numeric prefix used to make sure automated sorting keeps
  36. comments in the right order, e.g.:
  37. #00 Comment line 1...
  38. #01 Line 2...
  39. #02 3, etc.
  40. To create a file with only Latin characters from a non-Latin one, you can use
  41. sed with the "y" command. For example, to create a latin-only "Polish (Latin
  42. Characters)" file from the non-latin "Polish" one:
  43. sed 'y/ĄĆĘŁŃÓŚŹŻąćęłńóśźż/ACELNOSZZacelnoszz/' < Polish > "Polish (Latin Characters)"
  44. You can use this Wikipedia "Character sets" category page to help you find all
  45. the characters in the language file you want to convert into Latin-only:
  46. http://en.wikipedia.org/wiki/Category:Character_sets
  47. To convert all line terminators in all language files to CRLF (dos/mac/unix)
  48. you can use vim:
  49. a) cd rtdata/languages
  50. vim
  51. b) In vim, type:
  52. :set ffs=dos
  53. :args *
  54. :argdo w
  55. c) vim will process all language files. Once done, you can close it:
  56. :q