Skip to content

Conversation

@rk-for-zulip
Copy link
Contributor

Add a script to simplify pulling translation data.

Alternative of #3915.

Fixes #3895.

For convenience when comparing to file lists and other databases, list
languages in the source code by locale code, not by English name.

Sort languages for display when exporting, to preserve the existing
order in the language-selection menu.
In an upcoming commit, we'll add a YAML file to control our set of
available languages. Add this as a dependency so that we can include
it from there.

(This package, and this version thereof, is already used by ESLint.
The absence of a `yarn.lock` change in this commit is due to that, and
is not an error.)
Add a configuration file for our translation databases.

The data, and much of the commentary, in this file is taken from
`src/settings/languages.js`, with a few minor changes. The latter file
will be replaced with something autogenerated from this new file in an
upcoming commit.
Create a script (intended for use immediately after a Transifex pull)
to create automatic imports of all relevant Transifex message
databases.

It is a known failing of this script's output -- as it is of the
mostly-handwritten files which it replaces -- that all messages for
all languages are loaded at app start time, rather than only once (and
only if) a language is selected for use.
This replaces a number of existing files with autogenerated versions
which have fewer imports. In all cases, these imports were unused.

This also adds a new file, `src/i18n/language_list.js`, which is both
unused and redundant with `src/settings/languages.js`. This will be
amended in an upcoming commit.
By design, the data in `i18n/language_list.js` is identical to the
data in `src/settings/languages.js`. Remove the latter and replace it
with imports of the former.
Move the last remaining functional item in this file into its only
client, `settings/LanguagePicker.js`.
@rk-for-zulip rk-for-zulip force-pushed the automate-tx-hookup-alt branch from 36de5cb to 8cd4abe Compare May 6, 2020 00:43
@rk-for-zulip
Copy link
Contributor Author

Updated and rebased, in light of the recent Transifex sync. No changes to non-generated code were needed.

rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 7, 2020
Sentry error events are often delayed: there may be multiple API
calls to arbitrary routes in between the actual failed call and
the breadcrumb-list being sent.

To avoid any question as to which logged failure resulted in the
current error event, attach the call and response as "extra" data.

See discussion at zulip#4063.
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 7, 2020
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 7, 2020
Sentry error events are often delayed: there may be multiple API
calls to arbitrary routes in between the actual failed call and
the breadcrumb-list being sent.

To avoid any question as to which logged failure resulted in the
current error event, attach the call and response as "extra" data.

See discussion at zulip#4063.
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 7, 2020
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 8, 2020
Sentry error events are often delayed: there may be multiple API
calls to arbitrary routes in between the actual failed call and
the breadcrumb-list being sent.

To avoid any question as to which logged failure resulted in the
current error event, attach the call and response as "extra" data.

See discussion at zulip#4063.
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 8, 2020
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 8, 2020
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 8, 2020
Sentry error events are often delayed: there may be multiple API
calls to arbitrary routes in between the actual failed call and
the breadcrumb-list being sent.

To avoid any question as to which logged failure resulted in the
current error event, attach the call and response as "extra" data.

See discussion at zulip#4063.
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 8, 2020
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 8, 2020
Sentry error events are often delayed: there may be multiple API
calls to arbitrary routes in between the actual failed call and
the breadcrumb-list being sent.

To avoid any question as to which logged failure resulted in the
current error event, attach the call and response as "extra" data.

See discussion at zulip#4063.
rk-for-zulip added a commit to rk-for-zulip/zulip-mobile that referenced this pull request May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usable and used languages should be (better) synchronized

1 participant