Skip to content

Commit

Permalink
transifex: update config (#2115)
Browse files Browse the repository at this point in the history
ci: use i18n reusable workflows
  • Loading branch information
rekt-hard authored Jul 4, 2023
1 parent 70d7e7b commit a8bf664
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/i18n-pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2023 Graz University of Technology.
#
# Invenio App RDM is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

name: i18n:pull translations
on: workflow_dispatch # manually trigger

jobs:
i18n-pull:
uses: inveniosoftware/invenio-i18n/.github/workflows/i18n-pull-base.yml@master
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/i18n-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2023 Graz University of Technology.
#
# Invenio App RDM is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

name: i18n:push translations
on: workflow_dispatch # manually trigger

jobs:
i18n-extract:
uses: inveniosoftware/invenio-i18n/.github/workflows/i18n-push-base.yml@master
with:
extract-backend: true
frontend-package-path: invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm
secrets: inherit
8 changes: 4 additions & 4 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# Copyright (C) 2019 CERN.
# Copyright (C) 2019 Northwestern University.
# Copyright (C) 2023 Graz University of Technology.
#
# Invenio App RDM is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -23,15 +24,14 @@
# $ tx pull -a

[main]
host = https://www.transifex.com
host = https://app.transifex.com

[invenio.invenio-app-rdm-messages]
[o:inveniosoftware:p:invenio:r:invenio-app-rdm-messages]
file_filter = invenio_app_rdm/translations/<lang>/LC_MESSAGES/messages.po
source_file = invenio_app_rdm/translations/messages.pot
source_lang = en
type = PO


# Translate JavaScript strings
# 1) Navigate to the invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm folder
# 2) Install i18n dev dependencies
Expand Down Expand Up @@ -59,7 +59,7 @@ type = PO
# 11) Convert .po file for a single language
# $ npm run compile_catalog lang <lang>

[invenio.invenio-app-rdm-messages-ui]
[o:inveniosoftware:p:invenio:r:invenio-app-rdm-messages-ui]
file_filter = invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/<lang>/messages.po
source_file = invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/translations.pot
source_lang = en
Expand Down

0 comments on commit a8bf664

Please sign in to comment.