remoting_locales.gni 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. # Copyright 2015 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/chromeos/ui_mode.gni")
  5. import("//build/config/locales.gni")
  6. resources_locale_dir = "$root_gen_dir/remoting/resources/_locales"
  7. # See also remoting_locales_with_underscores below.
  8. remoting_locales_without_pseudolocales = [
  9. "am",
  10. "ar",
  11. "bg",
  12. "bn",
  13. "ca",
  14. "cs",
  15. "da",
  16. "de",
  17. "el",
  18. "en",
  19. "en-GB",
  20. "es",
  21. "et",
  22. "fa",
  23. "fi",
  24. "fil",
  25. "fr",
  26. "gu",
  27. "he",
  28. "hi",
  29. "hr",
  30. "hu",
  31. "id",
  32. "it",
  33. "ja",
  34. "kn",
  35. "ko",
  36. "lt",
  37. "lv",
  38. "ml",
  39. "mr",
  40. "ms",
  41. "nb",
  42. "nl",
  43. "pl",
  44. "pt-PT",
  45. "ro",
  46. "ru",
  47. "sk",
  48. "sl",
  49. "sr",
  50. "sv",
  51. "sw",
  52. "ta",
  53. "te",
  54. "th",
  55. "tr",
  56. "uk",
  57. "vi",
  58. "zh-CN",
  59. "zh-TW",
  60. ]
  61. # An additional locale "en-US" is generated for ChromeOS and Chrome on iOS.
  62. # TODO(yuweih): Our build script doesn't seem to work with en-US and Chrome
  63. # on iOS doesn't seem to have en-US.lproj. Add is_ios back if we do need to
  64. # work with en-US.
  65. if (is_chromeos) {
  66. # Support Icelandic in ChromeOS
  67. remoting_locales_without_pseudolocales += [
  68. "af",
  69. "cy",
  70. "en-US",
  71. "eu",
  72. "gl",
  73. "is",
  74. "zu",
  75. ]
  76. }
  77. # Locales "pt-BR" and "es-419" are named "pt" and "es-MX" respectively on iOS.
  78. if (!is_ios) {
  79. remoting_locales_without_pseudolocales += [
  80. "pt-BR",
  81. "es-419",
  82. ]
  83. } else {
  84. remoting_locales_without_pseudolocales += [
  85. "pt",
  86. "es-MX",
  87. ]
  88. }
  89. remoting_locales_with_underscores_without_pseudolocales = []
  90. foreach(locale, remoting_locales_without_pseudolocales) {
  91. remoting_locales_with_underscores_without_pseudolocales +=
  92. [ string_replace(locale, "-", "_") ]
  93. }
  94. pseudolocales_with_underscores = []
  95. foreach(locale, pseudolocales) {
  96. pseudolocales_with_underscores += [ string_replace(locale, "-", "_") ]
  97. }
  98. remoting_locales_with_pseudolocales =
  99. remoting_locales_without_pseudolocales + pseudolocales
  100. remoting_locales_with_underscores_with_pseudolocales =
  101. remoting_locales_with_underscores_without_pseudolocales +
  102. pseudolocales_with_underscores
  103. if (enable_pseudolocales) {
  104. remoting_locales = remoting_locales_with_pseudolocales
  105. remoting_locales_with_underscores =
  106. remoting_locales_with_underscores_with_pseudolocales
  107. } else {
  108. remoting_locales = remoting_locales_without_pseudolocales
  109. remoting_locales_with_underscores =
  110. remoting_locales_with_underscores_without_pseudolocales
  111. }
  112. remoting_android_locales = [
  113. "am",
  114. "ar",
  115. "bg",
  116. "ca",
  117. "cs",
  118. "da",
  119. "de",
  120. "el",
  121. "en-rGB",
  122. "es",
  123. "es-rUS",
  124. "fa",
  125. "fi",
  126. "fr",
  127. "hi",
  128. "hr",
  129. "hu",
  130. "in",
  131. "it",
  132. "iw",
  133. "ja",
  134. "ko",
  135. "lt",
  136. "lv",
  137. "nb",
  138. "nl",
  139. "pl",
  140. "pt-rBR",
  141. "pt-rPT",
  142. "ro",
  143. "ru",
  144. "sk",
  145. "sl",
  146. "sr",
  147. "sv",
  148. "sw",
  149. "th",
  150. "tl",
  151. "tr",
  152. "uk",
  153. "vi",
  154. "zh-rCN",
  155. "zh-rTW",
  156. ]
  157. # The list of .json files generated by remoting_strings.grd.
  158. remoting_resources_locale_files =
  159. process_file_template(
  160. remoting_locales_with_underscores_with_pseudolocales,
  161. [ "remoting/resources/_locales/{{source_name_part}}/messages.json" ])