canvas-lms/gems/canvas_i18nliner/package.json

23 lines
502 B
JSON
Raw Normal View History

{
"name": "i18nliner-canvas",
"description": "i18nliner, canvas style",
"private": true,
"main": "./js/main",
"version": "0.0.1",
"dependencies": {
"ember-template-compiler": "1.4.0",
i18nliner-handlebars (part I) 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&hellip;` -> `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>
2014-10-18 06:41:07 +08:00
"handlebars": "1.3.0",
"i18nliner": "0.0.16",
"i18nliner-handlebars": "0.1.0",
"jsdom": "~0.8.10",
"minimist": "^1.1.0",
"mkdirp": "^0.5.1"
fix js/hbs i18n key inference, fixes CNVS-18093 ensure inferred keys are never scoped to the file this fixes the current broken behavior: {{#t}}...{{/t}} scoped at extraction time not scoped at runtime {{t ...}} and I18n.t not scoped at extraction time scoped at runtime ruby key inference already works correctly (never scoped to the file) notes: running i18n:generate will now put all inferred keys at the root level. since no js/hbs inferred keys were actually resolving to their translations, this won't break any currently working translations and will fix a lot of stuff... the inline hbs t and I18n.t calls will start working immediately (since it was just a runtime scoping issue), the #t calls will automatically sort themselves out with a transifex round trip (since they were scoped incorrectly at extraction time). there are over 300 over the former and about a dozen of the latter. test plan: 1. confirm missing strings listed on ticket now show up. a good example of this is the new course wizard; whereas before nothing was translated, now everything is (apart from a few new strings that haven't made the transifex round trip) 2. see all the new specs 3. also, try it out yourself. essentially: 1. run `rake i18n:generate` 2. find the string you want to verify, and put a corresponding value in the right place in es.yml (or wherever) if there isn't already one 3. run `rake canvas:compile_assets` 4. run canvas with `RAILS_LOAD_ALL_LOCALES=true USE_OPTIMIZED_JS=true` 5. switch to es (or whatever) and verify the translation is displayed Change-Id: I0574b90acbdc4f6fda9c814a3607a9002c9e6a00 Reviewed-on: https://gerrit.instructure.com/47626 Tested-by: Jenkins Reviewed-by: Jennifer Stern <jstern@instructure.com> QA-Review: Clare Strong <clare@instructure.com> Product-Review: Jon Jensen <jon@instructure.com>
2015-01-22 07:40:44 +08:00
},
"devDependencies": {
"jasmine-node": "^1.14.5"
},
"scripts": {
"test": "./node_modules/.bin/jasmine-node ./test"
}
}