You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When changed, it causes elm-i18n-switch to miss clearing the cache. Thus, changing language will not affect the compiled result, even though the symlink is updated.
Example output with the "repository": "https://github.com/user/project.git", in elm-package.json:
$ elm-i18n-switch -l En --output dist --yes
Will create symlink from /Users/kvalle/prosjekter/testapp/Translation/En to /Users/kvalle/prosjekter/testapp/src/Translation
Using relative paths Translation/En to src/Translation
elm-make src/Main.elm --yes --output dist/En.js
Success! Compiled 8 modules.
Successfully generated dist/En.js
$ elm-i18n-switch -l No --output dist --yes
Will create symlink from /Users/kvalle/prosjekter/testapp/Translation/No to /Users/kvalle/prosjekter/testapp/src/Translation
Using relative paths Translation/No to src/Translation
clearing out cache at /Users/kvalle/prosjekter/testapp/elm-stuff/build-artifacts/0.18.0/user/project/1.0.0/Translation-Main.elmi
clearing out cache at /Users/kvalle/prosjekter/testapp/elm-stuff/build-artifacts/0.18.0/user/project/1.0.0/Translation-Main.elmo
elm-make src/Main.elm --yes --output dist/No.js
Success! Compiled 3 modules.
Successfully generated dist/No.js
$ diff dist/En.js dist/No.js
13690c13690
< return A2(_elm_lang$core$Basics_ops['++'], 'Hi, ', name);
---
> return A2(_elm_lang$core$Basics_ops['++'], 'Heisann, ', name);
13692c13692
< var _user$project$Translation_Main$greeting = 'English greeting text. Hi!';
---
> var _user$project$Translation_Main$greeting = 'Norsk tekst med hilsen. Hei!';
The compiled versions are as expected.
But, when changing elm-package.json to contain "repository": "https://github.com/actual-user/the-real-project-name.git",, the following occurs:
$ elm-i18n-switch -l No --output dist --yes
Will create symlink from /Users/kvalle/prosjekter/testapp/Translation/No to /Users/kvalle/prosjekter/testapp/src/Translation
Using relative paths Translation/No to src/Translation
elm-make src/Main.elm --yes --output dist/No.js
Success! Compiled 1 module.
Successfully generated dist/No.js
$ ls -l src | grep Translation
lrwxr-xr-x 1 kvalle 1333597109 65 Oct 2 13:21 Translation -> /Users/kvalle/prosjekter/testapp/Translation/No
$ elm-i18n-switch -l En --output dist --yes
Will create symlink from /Users/kvalle/prosjekter/testapp/Translation/En to /Users/kvalle/prosjekter/testapp/src/Translation
Using relative paths Translation/En to src/Translation
elm-make src/Main.elm --yes --output dist/En.js
Success! Compiled 1 module.
Successfully generated dist/En.js
$ ls -l src | grep Translation
lrwxr-xr-x 1 kvalle 1333597109 65 Oct 2 13:21 Translation -> /Users/kvalle/prosjekter/testapp/Translation/En
$ diff dist/En.js dist/No.js
$
Note that the clearing out cache at line is missing, and the compiled versions are identical.
The text was updated successfully, but these errors were encountered:
kvalle
changed the title
Custom repository name in elm-package.json is not supported
Custom repository name in elm-package.json is not supported
Oct 2, 2017
This line assumes that the github repository link is the default
user/project
: https://github.com/iosphere/elm-i18n/blob/master/index.js#L70When changed, it causes
elm-i18n-switch
to miss clearing the cache. Thus, changing language will not affect the compiled result, even though the symlink is updated.Example output with the
"repository": "https://github.com/user/project.git",
inelm-package.json
:The compiled versions are as expected.
But, when changing
elm-package.json
to contain"repository": "https://github.com/actual-user/the-real-project-name.git",
, the following occurs:Note that the
clearing out cache at
line is missing, and the compiled versions are identical.The text was updated successfully, but these errors were encountered: