canvas-lms/gems/canvas_i18nliner
Ahmad Amireh f9833d40fb cutover to the ESM extractor away from AMD's
refs FOO-2696
flag = none

Change-Id: Ia3a3921ef146cf23db8d20cbfde84ef472f7bade
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286705
Tested-by: James Butters <jbutters@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-03-10 21:38:43 +00:00
..
bin [node12] upgrade i18nliner-handlebars 2020-11-25 03:30:20 +00:00
js cutover to the ESM extractor away from AMD's 2022-03-10 21:38:43 +00:00
spec cutover to the ESM extractor away from AMD's 2022-03-10 21:38:43 +00:00
.gitignore i18nliner-js (part I) 2014-10-30 06:25:36 +00:00
.i18nrc [node12] upgrade i18nliner-handlebars 2020-11-25 03:30:20 +00:00
README.md (re) decentralize i18nliner configuration 2021-03-10 18:52:49 +00:00
package.json canvas_i18nliner: implement ESM extractor 2022-03-10 19:44:08 +00:00
test.sh work around yarn intermitent failure in vendored-gems 2020-07-28 00:30:51 +00:00

README.md

canvas_i18nliner

i18nliner, canvas style

this will replace the i18n_tasks and i18n_extraction gems

.i18nrc files must glob for files to be included through the files property:

{
  "files": [
    {
      "pattern": "**/*.js",
      "processor": "js"
    },
    {
      "pattern": "**/*.{hbs,handlebars}",
      "processor": "hbs"
    }
  ]
}

.i18nrc files can include other directories that may in turn specify more files through their .i18nrc configuration file:

{
  "include": [ "relative/path/to/dir" ]
}

.i18nignore files can exclude files from processing relative to where they are defined (similar to .gitignore):

// file: app/.i18nignore
foo 
bar/**/*.js

The above ignore file will exclude app/foo and app/bar/**/*.js.

Where to place ignore lists?

The scanner will always look for an .i18nignore adjacent to .i18nrc, but it will also discover and use any .i18nignore file found between the root and the target file:

app
├── .i18nignore
└── a
    ├── .i18nignore
    └── b
        └── c

A file under app/a/b/c/ is subject to exclusion according to rules found in both app/.i18nignore and app/a/.i18nignore.