Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: Add UI Support for Swedish Translation #1832

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ pip-wheel-metadata/

# node_modules
node_modules

# Transifex compiled files
README.md
tx
9 changes: 7 additions & 2 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ type = PO


# Translate JavaScript strings
# 1) Navigate to the invenio-rdm-records/theme/assets/semantic-ui/translations/invenio-rdm-records folder
# 1) Navigate to the invenio_rdm_records/assets/semantic-ui/translations/invenio_rdm_records/ folder
# cd invenio_rdm_records/assets/semantic-ui/translations/invenio_rdm_records/
# 2) Install i18n dev dependencies
# npm install
# 3) Add a new language
Expand All @@ -48,14 +49,18 @@ type = PO
# <lang>: { translation: TRANSLATE_<lang> }
# }
# 6) Install the transifex-client
# $ pip install transifex-client
# Navigate to the root of the project then run:
# see: https://developers.transifex.com/docs/cli#installing-with-a-script-linuxmac
# $ curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
# 7) Push source (.pot) and translations (.po) to Transifex
# $ tx push -s -t
# 8) Pull translations for a single language from Transifex
# Make sure to be in the root of the project
# $ tx pull -l <lang>
# 9) Pull translations for all languages from Transifex
# $ tx pull -a
# 10) Compile .po files for all languages
# Navigate back to the invenio_rdm_records/assets/semantic-ui/translations/invenio_rdm_records/ folder
# $ npm run compile_catalog
# 11) Convert .po file for a single language
# $ npm run compile_catalog lang <lang>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import TRANSLATE_EN from "./en/translations.json";
import TRANSLATE_DE from "./de/translations.json";
import TRANSLATE_EL from "./el/translations.json";
import TRANSLATE_SV from "./sv/translations.json";

export const translations = {
el: { translation: TRANSLATE_EL },
en: { translation: TRANSLATE_EN },
de: { translation: TRANSLATE_DE },
sv: { translation: TRANSLATE_SV },
};
Loading