19 Commits

Author SHA1 Message Date
e1af2e15cb I18n: Import Scenes translations (#106852)
* wip

* use initScenesTranslations

* comment

* use just plain resource loaded from scenes lib

* update to the published scenes version

* rename loadPluginResources to loadNamespacedResources
2025-06-24 10:00:41 +01:00
e49c73533b I18n: Allow pseudo-locale to be enabled in production builds (#106738)
* I18n: Allow pseudo-locale to be enabled in production builds

* fix tests now that pseudo is around

* remove psuedo locale from i18n package

* load en-us from plugin resources for pseudo

* fix tests + remove 'hidden' option

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-06-17 10:55:15 +01:00
8a2af6166c i18n: adds @grafana/i18n package (#104603)
* i18n: adds grafana/i18n

* Trigger build

* chore: fix frontend lint

* chore: refactor

* chore: refactor

* chore: expose getI18nInstance in shared deps

* chore: refactors away second init

* Trigger build

* chore: updates after PR feedback

* chore: sync with enterprise

* chore: adds shouldUnescape

* Trigger build

* chore: makes functions internal

* Trigger build

* chore: fix for Pseudo locale

* chore: bumps package version

* chore: fix the version of i18n package
2025-05-09 05:45:20 +02:00
3de09fe457 i18n: exposes languages in grafana/data (#102958)
* i18n: exposes languages in grafana/data

* Chore: updates after PR feedback
2025-04-07 11:53:04 +02:00
3a9370083f I18n: Add 13 new languages for translations (#102971)
I18n: Remove extraLanguages toggle
2025-03-27 12:58:52 +00:00
210c886bb7 I18n: Add new language options (#101899)
* Add newLanguages feature toggle

* add additional languages behind feature toggle

* be more forgiving of what config looks like in tests

* tweak regex

* put pt-br back

* restore order of pt-BR and cn-Hans, rename EXTRA_LANGUAGES to NEW_LANGUAGES

* stricter test regex
2025-03-11 12:07:16 +02:00
852243c8f0 Chore: Remove pseudoizer and use i18next-pseudo instead (#101690)
* Remove pseudoizer and use i18next-pseudo instead

* Remove pseudo.mjs script

* Conditionally add pseudo post processing to i18n config

* Remove pseudo-locale in favour of post processing

* Add wrapped property to pseudo strings
2025-03-10 12:02:31 +00:00
b662879c98 Internationalisation: Add basic e2e test to ensure languages load correctly (#96556)
* fix pseudo locale and add simple e2e test

* add comment

* update test and add comments

* fix unit test

* try 5 instead of 6?

* clear input

* only check pseudo in dev mode

* don't check pseudo in CI

* don't test pseudo locale

* isolate language changes

* move waits around

* only wait for preferences on first visit

* add proper loading state

* bit of tidy up

* hook up ids correctly

* use disabled/isLoading instead of skeleton

* set props on Field
2024-11-19 15:07:14 +00:00
b0c043de5f Fix: Portuguese Brazilian wasn't loading translations (#89302) 2024-06-18 18:06:35 +01:00
fe24404432 I18n: Support for Enterprise translations (#86215)
* I18n: Support for Enterprise translations

* don't attempt to link to enterprise in tests

* move extract script to makefile to optionally support enterprise

* update references to old extract script

* update docs

* thank god for unit tests
2024-04-18 16:25:27 +01:00
b525de07cd I18n: Add Brazilian Portuguese (#84461)
* Add pt-br as supported language

* docs

* update pt-br path:

* docs
2024-03-21 13:51:30 +02:00
2650aa5600 Internationalization: Correctly generate plural forms (#71341)
* user essentials mob! 🔱

lastFile:public/locales/pseudo-LOCALE/grafana.json

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:contribute/internationalization.md

* user essentials mob! 🔱

lastFile:contribute/internationalization.md

* move pseudo generation to precommit hook if en-US file is modified

Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>

* fix unit tests

---------

Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Roxana Turc <anamaria-roxana.turc@grafana.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>
2023-07-11 16:37:01 +01:00
460be70261 Internationalization: Change locale preference to language (#58359)
* backend locale -> language

* frontend locale -> language

* sample.ini and tests

* fix few last locale -> language

* fix few last locale -> language
2022-11-22 12:18:34 +00:00
e417387bc7 I18n: Add German (#57397) 2022-10-21 11:47:17 +01:00
fc75076b72 I18n: Show languages in local names (#57367)
* I18n: Show languages in local names

* fixed test
2022-10-21 05:29:03 -04:00
719769ee7c I18n: Add Chinese (Simplified) (#56739)
* Prevent _old.json files from being created

* Add contrib docs for adding new locale

* add chinese (simplified)
2022-10-12 06:12:46 -04:00
5361efc225 I18n: Migrate to I18next (#55845)
* Switch from lingui from i18next

* Change lingui messages to i18next messages

* Change lingui messages to i18next messages (grafana-ui)

* Init i18n for tests
2022-10-06 16:34:04 +01:00
ebbeed8ad7 I18n: Use locale preference (#53293) 2022-08-26 10:27:14 +01:00
9f81b3dcc6 I18n: Change locale format to IETF language tag (#52596)
* I18n: Change locale format to our agreed format

* fix test

* Build lingui messages files before ci tests
2022-07-22 10:50:00 -04:00