Commit Graph

8 Commits

Author SHA1 Message Date
Suraj kumar (sk) ee14514929 fix: Fixed windows build error (#3211)
Closes #3208
Closes #3204
2021-03-12 09:35:31 -08:00
Joey Parrish feffedf1c0 build: Fix build with Python 3.5
Starting in Python 3.6, Python will convert bytes to strings inside
json.load, assuming UTF-8 if I understand correctly.  In Python 3.5,
you either need to do that yourself, or open the files as text instead
of binary.  So this opens all JSON files as text to fix Python 3.5
support.

Although Python 3.5 went EOL a couple months ago, it was very recent,
and Python 3.5 is still shipping in the Debian-based distro we are
using.  So probably others still have it, as well.

Closes #3004

Change-Id: I0c829fa1af6a92bcf7f40c4ca41a76de278d3eb1
2020-11-23 15:10:38 -08:00
Joey Parrish 7e6a0f38ff fix: Correct license headers in misc. files
This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs.  This does not
affect the compiled output, and is only done for consistency.

Issue #2638

Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
2020-06-09 16:13:56 -07:00
Joey Parrish 88ebd5bcd7 Add translations for tier 2 languages
These are not compiled into the library by default, but can be with
the --locales option to either build/build.py or build/all.py.  They
can also be lazy-loaded on-demand, as in our demo app.

There are still some missing translations for Finnish ("fi"), Hebrew
("iw"), and Indonesian ("id").

This also corrects the list of tier 1 default languages in the build
scripts.

Change-Id: I992d7bebbb4e04d55b7992ecaee1d85bb6c1c5da
2020-03-23 16:56:37 +00:00
Joey Parrish 8db79cbcfb Update translations
Change-Id: I3dca0ab82c6b71ad4cad7fc052ae9a8b8a50898c
2019-10-24 19:53:10 +00:00
Jacob Trimble 3da809019b Enable additional ES6 linter rules.
Change-Id: I6861541b27153ba034364a5972a9b086de581cef
2019-06-11 18:35:09 +00:00
Joey Parrish 00442a9a7c Split up localization data for lazy loading
This changes the format of the localization data to enable apps to
trivially lazy-load translations.  It also adds --locales to the build
scripts to allow app developers to choose the compiled-in locales.
The generated output now goes into dist/ and is not checked into
revision control.  Finally, it adds "description" and "meaning" fields
to the source messages to allow us to more easily integrate with a
context-aware human translation service.  The "description" field
provides application context for the translator, while the "meaning"
field provides linguistic disambiguation for words with multiple
meanings or parts of speech in the original English.

Because the translation service wants to collapse messages with
identical text, we had to merge several messages together.  To this
end, we have removed the prefixes "ARIA_LABEL_" and "LABEL_" from the
messages themselves and collapsed what remained.

Issue #1688

Change-Id: I24c17e71c73f6663cf123cfdba118c486fa80ecc
2019-04-09 16:06:14 -07:00
Joey Parrish b67fa89f73 Rename generate-locales to generateLocalizations
The generate-locales script had to be renamed to camelCase to allow
import as a module in python.  This is pre-work to make the following
commit's diff easier to read.

Issue #1688

Change-Id: I7368573269e201b295d99c080b901f92a3c3d6e1
2019-04-02 19:45:59 -07:00