2016-08-26 05:28:53 +08:00
|
|
|
.DS_Store
|
|
|
|
.dockerignore
|
2014-12-10 06:46:27 +08:00
|
|
|
.git
|
2016-08-26 05:28:53 +08:00
|
|
|
.gitignore
|
|
|
|
.idea
|
|
|
|
|
2017-05-24 03:44:39 +08:00
|
|
|
build/
|
2017-07-07 03:04:59 +08:00
|
|
|
!build/vendor/woff-code-latest.zip
|
2019-08-22 03:12:19 +08:00
|
|
|
!build/gergich/
|
2020-02-24 06:51:47 +08:00
|
|
|
!build/new-jenkins/
|
2020-12-02 11:49:56 +08:00
|
|
|
!build/docker_utils.rb
|
|
|
|
!build/dockerfile_writer.rb
|
|
|
|
!build/Dockerfile.template
|
2016-08-26 05:28:53 +08:00
|
|
|
docker-compose/
|
2016-09-23 02:42:34 +08:00
|
|
|
!docker-compose/config/*
|
2016-11-19 04:22:38 +08:00
|
|
|
docker-compose.local.*.yml
|
2016-08-26 05:28:53 +08:00
|
|
|
docker-compose.override.yml
|
|
|
|
|
2017-05-24 03:44:39 +08:00
|
|
|
coverage/
|
|
|
|
coverage-js/
|
|
|
|
gems/*/node_modules/
|
|
|
|
gems/plugins/*/node_modules/
|
|
|
|
gems/plugins/*/.git
|
2020-03-16 20:23:58 +08:00
|
|
|
/log/*
|
|
|
|
!/log/.keep
|
|
|
|
!/log/parallel-runtime-rspec.log
|
2016-08-26 05:28:53 +08:00
|
|
|
node_modules/
|
2018-04-17 21:26:54 +08:00
|
|
|
packages/*/node_modules/
|
2016-08-26 05:28:53 +08:00
|
|
|
public/dist/
|
2016-12-14 00:12:49 +08:00
|
|
|
public/doc/
|
|
|
|
public/javascripts/translations/
|
(i18n-js:5) flatten translation files
refs FOO-2801
flag = none
[change-merged][build-registry-path=jenkins/canvas-lms/foo-2801]
[pin-commit-analytics=4fd9e2fbb7fc2790ba7985bb4025e901bf33a9e3]
this part reaches the goal of this series where we turn the locale
files that are used by our JS engine into plain JSON files that don't
need any special processing and are also of a simpler structure
before, translations were stored in a tree structure that we needed to
traverse in order to look up a translation, which we did by
deconstructing keys through the "." operator:
I18n.lookup("foo.bar.baz")
{
en: {
foo: {
bar: {
baz: "Hello!" // <-- this
}
}
}
}
now, translations are stored in a flat dictionary structure where the
keys are not processed in any special way but are instead "fully
qualified":
I18n.lookup("foo.bar.baz")
{
en: {
"foo.bar.baz": "Hello!"
}
}
this is nice when you consider that the previous structure contained a
mixture of nested keys and flat ones, based on different conditions:
{
en: {
"asdf_1234": "ASDF", // inferred, so it was never "nested"
"foo": {
"bar": {
"baz": {
"one": "One banana",
"other": "Many many bananas"
}
}
}
}
}
because, for example, keys that are inferred by i18nliner end up at
the root level and not nested. You also never knew whether a key was a
container or a phrase that was pluralized, because they both had the
shape of an object.
Now these distinctions are gone; a key is always fully-qualified
regardless of how it was specified:
1) inferred: I18n.t("Inferred key")
// => inferred_key_c49e3743
2) absolute: I18n.t('#buttons.cancel')
// => buttons.cancel
3) relative: I18n = useScope('outer')
I18n.t('something', 'Something')
// => outer.something
4) nested: I18n = useScope('outer');
I18n.t('something.inside', 'Something inside')
// => outer.something.inside
5) pluralized: I18n.t({
one: 'One banana',
other: 'Many bananas'
})
// => many_many_bananas_ce8e7fb7.one
// => many_many_bananas_ce8e7fb7.other
Change-Id: I7c33fbd2321d7d56994223d65f2572db0ac12ed5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293675
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-06-20 00:41:34 +08:00
|
|
|
!public/javascripts/translations/en.json
|
2024-06-05 00:34:38 +08:00
|
|
|
log/
|
|
|
|
!log/.keep
|
2020-03-16 20:23:58 +08:00
|
|
|
tmp/*
|
2016-08-26 05:28:53 +08:00
|
|
|
vendor/bundle/
|
2017-05-24 03:44:39 +08:00
|
|
|
vendor/*/.git
|
2016-09-23 02:42:34 +08:00
|
|
|
Dockerfile
|
2020-03-16 20:23:58 +08:00
|
|
|
*.Dockerfile
|
2016-12-14 00:12:49 +08:00
|
|
|
mkmf.log
|