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
For Skosmos 3, we have already implemented UI translations for PHP backend code (PR #1466) and Twig templates (PR #1520). But text in Vue components is not yet translated to the UI language, as can be seen for example in the vocab-counts and term-counts components on the vocabulary home page (the texts "Resource counts by type", "Term counts by language" etc. are currently hardcoded and always shown in English):
To fix this, we need to add internationalization support to the Vue components, most likely using Vue i18n.
We also need to provide the Vue components with the correct messages for each language. For Skosmos 2, this was done using global JS variables, like this:
<!--translationsneededinjavascript-->varnoResultsTranslation="Ei tuloksia";varloading_text="Ladataan sisältöä";varloading_failed_text="Virhe: Lisätulosten haku epäonnistui!";varloading_retry_text="Yritä uudelleen";varjstree_loading="Ladataan ...";varresults_disp="Näytetään kaikki %d tulosta";varall_vocabs="kaikista sanastoista";varn_selected="sanastosta";varmissing_value="Kenttä on pakollinen";varexpand_paths="näytä kaikki # polkua";varexpand_propvals="näytä kaikki # arvoa";varhiertrans="Hierarkia";vardepr_trans="Käytöstä poistettu käsite";varsr_only_translations={hierarchy_listing: "Hierarkian mukainen lista käsitteistä",groups_listing: "Hierarkian mukainen lista käsitteistä ja ryhmistä",};
A similar but hopefully less ugly mechanism for passing the messages from the backend to the frontend is needed. One option would be to add the necessary messages to the SKOSMOS global object (see #1438 where it was implemented).
The text was updated successfully, but these errors were encountered:
If we switched to a JSON based message format, it would simplify the implementation of Vue translations as there would be no need to pass specific messages from the backend to the frontend. I opened issue #1525 proposing this.
Issue #1656 is a near-duplicate of this. But we can consider this issue to be the broader task of translations in all Vue components, while #1656 is about providing the framework for doing this.
For Skosmos 3, we have already implemented UI translations for PHP backend code (PR #1466) and Twig templates (PR #1520). But text in Vue components is not yet translated to the UI language, as can be seen for example in the vocab-counts and term-counts components on the vocabulary home page (the texts "Resource counts by type", "Term counts by language" etc. are currently hardcoded and always shown in English):
To fix this, we need to add internationalization support to the Vue components, most likely using Vue i18n.
We also need to provide the Vue components with the correct messages for each language. For Skosmos 2, this was done using global JS variables, like this:
A similar but hopefully less ugly mechanism for passing the messages from the backend to the frontend is needed. One option would be to add the necessary messages to the SKOSMOS global object (see #1438 where it was implemented).
The text was updated successfully, but these errors were encountered: