There have been some inconsistencies in date and time formats. However,
by standardizing our own translation config files on 24 hour time
formats and including the Hebrew Geresh symbol (׳) in our day and month
name abbreviations we have found a configuration that seems to work well
(or at least consistently).
closes CNVS-26264
test plan:
- enable translations locally and set your language to hebrew
- make sure both ruby and javascript translations work
- check a datetime field specifically
Change-Id: I07128071fb89d7129a1fbdc1e0c446866850f3f5
Reviewed-on: https://gerrit.instructure.com/69911
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-26357
refs CNVS-19910
fixes CNVS-27098
fixes CNVS-27099
fixes CNVS-27100
A few of our language codes were somewhat inaccurate, either
lacking an appropriate suffix or using underscores and not
hyphens. This change uses more accurate language codes.
When language codes were passed to the JavaScript layer, one of
the languages, zh_Hant, did not conform to RFC-5646.
When it was consumed later in the JS, its underscore caused
an issue which prevented editing in the Gradebook.
Test plan:
0. Create and publish course. Create and publish an assignment.
1. Add a user named "匿名" to the course.
2. Give the user a grade in the gradebook.
3. In the course settings (`/courses/:id/settings`) set the
course language to zh_hant (2nd from bottom).
4. Navigate to Gradebook and verify that you can still edit
grades.
Revert "rollback aba0de7 and its effects"
This reverts commit 7339952ea4.
Change-Id: I9de7c3a6d5f046c6e06671a44b1f77dc47d62954
Reviewed-on: https://gerrit.instructure.com/72753
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
refs #CNVS-26056
Change-Id: I0cb3c3c46ccee9e26972853aa0f08db0f0fffcce
Reviewed-on: https://gerrit.instructure.com/70967
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
rely on test_all_gems.sh to output header and trailer,
and use `set -e` in each test.sh to simplify passing
through errors
Change-Id: I3ba724ad2539ddfe31195394c43f646acfc73920
Reviewed-on: https://gerrit.instructure.com/70469
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
until we can update transifex at the same time as we merge the rename.
this reverts commits:
* f2cbb3e76e
(Updated zh_Hant translation)
* 9ab70066fd
(Updated zh translation)
* d861ceca74
(Updated fa-IR translation)
* aba0de7b96
(rename some locales)
Change-Id: I130a0a14e366274c86026bbaccad985a24bb4f1f
Reviewed-on: https://gerrit.instructure.com/63496
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
fixes CNVS-19910
fixes CNVS-23061
* zh_Hant => zh-Hant (dash according to IETF standard)
* zh => zh-Hans (it's really simplified Chinese)
* fa-IR => fa (so that it will apply for _any_ Persian locale,
not just Iran)
also handle fallbacks for deprecated languages
test plan:
* _before_ applying this commit, change your language to one of
the locales being renamed
* apply the commit, but don't run the migration
* ensure that your Canvas is still translated, both normal and
JS translations
* run the migration
* you should still be translated, and in your user settings it shows
the correct language translation
Change-Id: If02793fce1db57856895899804f1389076093d0a
Reviewed-on: https://gerrit.instructure.com/57111
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
also make it easier to find which gem failed specs
Change-Id: I4cfc6edcea1cf5d1c78043c4eda7db9998ed1f12
Reviewed-on: https://gerrit.instructure.com/56181
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
* add test runner for broadcast_policy and fix a couple of tests that
had been broken by accident
* add test runner for canvas_quiz_statistics and add a reference to
iconv to it's Gemfile to allow tests to run in ruby 2
* add a test runner for canvas_sanitize
* remove leftover cruft from running gem builds in both rails 2 and 3
Change-Id: Iab2a0986f277a82c096e1fff2dab1d3a55b91733
Reviewed-on: https://gerrit.instructure.com/54518
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
These are keys we don't want going to transifex (and actually in this specific
case break loading the yml into transifex, since rails uses symbols instead of
strings for these)
Change-Id: Ife2eb01998c8173f180fe9158525b2026964c7c5
Reviewed-on: https://gerrit.instructure.com/52126
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
this appears to have broken in d005e2d1 even though the test plan should
have caught it :-/ ... the will_paginate strings were previously
translated, but started disappearing in subsequent transifex round trips
since i18n:generate stopped including them ... e.g. see commits fa8419c2
and bffbe3db
note:
the translations won't magically reappear, we'll need to wait for the
transifex round trip (unless someone manually loads them in there sooner)
test plan:
1. run rake i18n:generate before and after this commit
2. the only difference should be the addition of the will_paginate strings
Change-Id: Iad73ceb56d17129111dcabb2d78e41b0313e81f6
Reviewed-on: https://gerrit.instructure.com/47541
Tested-by: Jenkins
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
test plan:
- run canvas with LOLCALIZE=true
- go to a course homepage
- it should load
Change-Id: I9dec6b2a4ffc800d569e74e24d0cfe49158d9660
Reviewed-on: https://gerrit.instructure.com/46600
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
handle nesting and extraneous whitespace
test plan:
1. specs should pass
2. latest strings should not give a wrapper error around
discrimination_index_help
Change-Id: I553395830f9a219ccc7c6f3ff580dab05c065fbc
Reviewed-on: https://gerrit.instructure.com/45721
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Addison Higham <ahigham@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Change-Id: Ib7db93b7ce5c877d2c0dcf24ee0d748f11ec58cb
Reviewed-on: https://gerrit.instructure.com/44806
Reviewed-by: Adam Ard <aard@instructure.com>
Product-Review: Adam Ard <aard@instructure.com>
QA-Review: Adam Ard <aard@instructure.com>
Tested-by: Adam Ard <aard@instructure.com>
this broke w/ the i18nliner commit
test plan:
1. run canvas w/ LOLCALIZE=true
2. there should be lols
Change-Id: I346fca2d6ebf243849e07990673fadf5aba50e3b
Reviewed-on: https://gerrit.instructure.com/44288
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
refs https://trello.com/c/Ls5yeXt4/40
reduces wall time ~20 sec (when not using spring)
test plan:
1. change your database.yml to have a bogus db
2. `rake i18n:check` should not give you a db error
3. `rake i18n:generate` should produce the same yml as before
4. they both should start up about 20 sec faster \o/
Change-Id: I1f13b350f3ccc4d9b572514b5cdaee2f35c02ce4
Reviewed-on: https://gerrit.instructure.com/43887
Product-Review: Jennifer Stern <jstern@instructure.com>
Reviewed-by: Jennifer Stern <jstern@instructure.com>
QA-Review: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
extraction and runtime for vanilla handlebars. ember will be part II
because its strings currently don't even get extracted on master
¯\_(ツ)_/¯
differences in generated yml:
1. `%h{...}` placeholders from hbs are just `%{...}`, since html-safety is
inferred at runtime without needing a placeholder hint (6 occcurrences)
2. inline `{{t ...}}` calls are now extracted (6 occurrences)
3. some trivial whitespace difference around some wrappers (2 occurrences)
4. html-entities are correctly converted into unicode equivalents, e.g.
`Move To…` -> `Move To…` (1 occurrence)
test plan:
1. verify string extraction:
1. `rake js:generate i18n:generate` before and after this commit
2. confirm `config/locales/generated/en.yml` is identical, except the
differences listed above
2. verify js translation file generation:
1. `rake i18n:generate_js` before and after this commit
2. confirm the files in public/javascripts/translations are identical
3. verify hbs translation keys/scope behavior at runtime:
1. run canvas w/ RAILS_LOAD_ALL_LOCALES=true and optimized js
2. use canvas in spanish
3. confirm that todo está bien
4. confirm you can now use i18nliner-y features:
1. block helper with no key `{{#t}}hello world{{/t}}`
2. inline helper with no key `{{t "hello world"}}`
Change-Id: Ic2a2c5cf102ca482919cbb91ac1c154467029685
Reviewed-on: https://gerrit.instructure.com/42942
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
this swaps out our "parsing" with i18nliner-js
also remove localization abilities of I18n.beforeLabel, since it's not
worth the trouble to support. it can still be called to format a string.
notable changes/fixes in generated yml:
1. client_apps are picked up by i18n:rake so they'll get translated...
due to the old short-circuiting logic (`rc = rc && ...`), it would
stop processing scripts within a particular file after the first one
it found without an I18n.t
2. we no longer incorrectly double-escape special chars in our js strings
(e.g. newlines are actually newlines, not a literal "\n")
test plan:
1. verify string extraction:
1. `rake js:generate i18n:generate` before and after this commit
2. confirm `config/locales/generated/en.yml` is identical, except the
notable changes/fixes listed above
2. verify js translation file generation:
1. `rake i18n:generate_js` before and after this commit
2. confirm the files in public/javascripts/translations are identical
3. verify client_app checker still works:
1. `cd client_apps/canvas_quiz_statistics/`
2. `grunt check_i18n`
Change-Id: Ic8ad058bee1c9476f42916f10b612c1c08863fe3
Reviewed-on: https://gerrit.instructure.com/42809
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
this swaps out (most of) our ruby haax with i18nliner
test plan:
1. verify string extraction:
1. `rake i18n:generate` before and after this commit
2. confirm `config/locales/generated/en.yml` is identical
2. verify english defaults:
1. use canvas in english
2. confirm everything looks correct
3. verify translation keys/scopes:
1. run canvas w/ RAILS_LOAD_ALL_LOCALES=true and optimized js
2. use canvas in spanish
3. confirm that todo está bien
4. confirm you can now use i18nliner-y features:
1. call `t` without a key
2. use the fancy erb block syntax
Change-Id: I979479c0889fe7e31ee0c962a4bd1998ab54d711
Reviewed-on: https://gerrit.instructure.com/42785
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
fixes CNVS-15576 frd
this way we don't treat the "# Assignments" as a heading during our import
checks
test plan:
0. specs
1. import the latest transifex stuff
2. it should not complain about "# Assignments"
Change-Id: Ic572c88aa4e6d7151d4c9647a6ac94b8af3612e0
Reviewed-on: https://gerrit.instructure.com/43422
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
This patch makes `i18n:check` and `i18n:generate_js` able to parse
source files that may contain more than one AMD module. Usage is
described in the gem's (newly added) README.md file.
Closes CNVS-14691
TEST PLAN
---- ----
- make sure `i18n:generate` and `i18n:check` rake tasks work
Change-Id: Ic1280c0b31fd274da2529ebeac7f72f72934f1ab
Reviewed-on: https://gerrit.instructure.com/39014
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
basically two changes:
1. ensure locales.yml is loaded last, to ensure we don't get any wonky
overrides from translators
2. don't send those strings off for translation any more
test plan:
1. in a rails console w/ RAILS_LOAD_ALL_LOCALES=true, confirm that:
> I18n.backend.direct_lookup("nl", "qualified_locale")
=> "nl-NL"`
2. run `rake i18n:generate` and confirm that "qualified_locale" does
not appear anywhere in ./config/locales/generated/en.yml
3. in canvas (w/ RAILS_LOAD_ALL_LOCALES=true), change your locale to
"Nederlands (Crowd Sourced)"
4. confirm that you can still view wiki pages
Change-Id: I3923f58d7b9433a9e5e062e16e1556d79f845ae4
Reviewed-on: https://gerrit.instructure.com/38475
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
since rails3 is the default, check in the new version so that others
don't get prompted to
test plan:
n/a, see spec ... in the real world compile_assets will ensure it is
current. this file is in version control to ensure dev i18n.js doesn't
asplode if you aren't compiling assets
Change-Id: I182b0864fd8fe4c4176fd71f695e19f6f7b405a9
Reviewed-on: https://gerrit.instructure.com/37795
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
they're likely already installed, and it will save a ton of trips
to rubygems.org
Change-Id: I9ccf2194619a6e8f97d7f21b4e232dac7ff20d3c
Reviewed-on: https://gerrit.instructure.com/35694
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Change-Id: I0dad5345aae75e552af97f5b54ded10bbfebbe37
Reviewed-on: https://gerrit.instructure.com/33925
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
fixes: CNVS-12513
test plan:
- run rake tasks for i18n and jst
Change-Id: Ied2b1d67979e55356adfef1cc7aaed42aa0c4b5a
Reviewed-on: https://gerrit.instructure.com/33501
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>