-
-
Notifications
You must be signed in to change notification settings - Fork 181
jhi-item-count Does not change language #455
Comments
Ok, after playing a little more, and needing a translation with parameters, I realized that the translate function needs to send the parameters for the placeholders, also I do not know why this particular component uses
To
If this seems the correct way to do it for you, I can prepare the pull request to fix this detail. |
I can confirm, all the i18n fields with parameters are generated incorrectly, for example in the entities:
|
thanks for reporting this. About the replace code for translation, it is here: https://github.com/jhipster/jhipster-vuejs/blob/master/generators/utils.js#L103 |
I can work in the changes in the week end if you want, seems like a good first issue, I just do not know if i need to repeat the names
Or if there is a more elegant way when the parameters are named as the variables. Also, is there a reason why you use |
Overview of the issue
The
jhi-item-count
component does not change the language after the user select other than the default.Motivation for or Use Case
The translation is in the global.json file, so, it should work.
Reproduce the error
Related issues
Not that I am aware of
Suggest a Fix
From what I see the span is taking the text from the tag body and not from the
$t
function, if I chage theto
Then the label is loaded, but the place holders are not replaced for the actual values.
JHipster Version(s)
v6.3.1
JHipster configuration
v6.3.1
JHipster configuration
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode)
git version 2.17.1
node: v10.16.3
npm: 6.9.0
yeoman: 3.1.0
Docker version 19.03.2, build 6a30dfc
docker-compose version 1.24.1, build 4667896b
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
Tested with Firefox and chrome in Ubuntu
The text was updated successfully, but these errors were encountered: