Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
invenio-previewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fdm
invenio-previewer
Commits
53ca6904
Unverified
Commit
53ca6904
authored
2 years ago
by
David
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
transifex: update config (#173)
ci: use i18n reusable workflows
parent
fc3e5d26
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.github/workflows/i18n-pull.yml
+4
-54
4 additions, 54 deletions
.github/workflows/i18n-pull.yml
.github/workflows/i18n-push.yml
+6
-59
6 additions, 59 deletions
.github/workflows/i18n-push.yml
.tx/config
+3
-2
3 additions, 2 deletions
.tx/config
run-tests.sh
+1
-1
1 addition, 1 deletion
run-tests.sh
with
14 additions
and
116 deletions
.github/workflows/i18n-pull.yml
+
4
−
54
View file @
53ca6904
# -*- coding: utf-8 -*-
#
# Copyright (C) 202
2
Graz University of Technology.
# Copyright (C) 202
3
Graz University of Technology.
#
# Invenio
-Previewer
is free software; you can redistribute it and/or modify
# Invenio 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
...
...
@@ -10,55 +10,5 @@ on: workflow_dispatch # manually trigger
jobs
:
i18n-pull
:
runs-on
:
ubuntu-20.04
env
:
PYTHON-VERSION
:
3.9
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
# setup python
-
name
:
Set up Python ${{ env.PYTHON-VERSION }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ env.PYTHON-VERSION }}
# install dependencies
-
name
:
Install dependencies
run
:
|
pip install -e ".[all]"
# install transifex client
-
name
:
transifex-client
run
:
|
pip install transifex-client
# store token
-
name
:
store token
run
:
|
touch ~/.transifexrc
echo [https://www.transifex.com] >> ~/.transifexrc
echo api_hostname=https://api.transifex.com >> ~/.transifexrc
echo hostname=https://www.transifex.com >> ~/.transifexrc
echo password=${{ secrets.TRANSIFEX_TOKEN }} >> ~/.transifexrc
echo username=api >> ~/.transifexrc
# pull all lang
-
name
:
pull translations
run
:
|
tx pull -a -f
# remove transifex credential file
-
name
:
remove transifexrc file
uses
:
JesseTG/rm@v1.0.2
with
:
path
:
~/.transifexrc
-
name
:
Create Pull Request
uses
:
peter-evans/create-pull-request@v3
with
:
commit-message
:
i18n:pulled translations
title
:
i18n:pulled translations
body
:
i18n:pulled translations
branch
:
101-translations-pull
# name of branch which PR is created from
delete-branch
:
true
# delete branch once merged,closed
uses
:
inveniosoftware/invenio-i18n/.github/workflows/i18n-pull-base.yml@master
secrets
:
inherit
This diff is collapsed.
Click to expand it.
.github/workflows/i18n-push.yml
+
6
−
59
View file @
53ca6904
# -*- coding: utf-8 -*-
#
# Copyright (C) 202
2
Graz University of Technology.
# Copyright (C) 202
3
Graz University of Technology.
#
# Invenio
-Previewer
is free software; you can redistribute it and/or modify
# Invenio 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
...
...
@@ -10,60 +10,7 @@ on: workflow_dispatch # manually trigger
jobs
:
i18n-extract
:
runs-on
:
ubuntu-20.04
env
:
PYTHON-VERSION
:
3.9
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
# setup python
-
name
:
Set up Python ${{ env.PYTHON-VERSION }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ env.PYTHON-VERSION }}
# install dependencies
-
name
:
Install dependencies
run
:
|
pip install -e ".[all]"
# install transifex client
-
name
:
transifex-client
run
:
|
pip install transifex-client
# store token
-
name
:
store token
run
:
|
touch ~/.transifexrc
echo [https://www.transifex.com] >> ~/.transifexrc
echo api_hostname=https://api.transifex.com >> ~/.transifexrc
echo hostname=https://www.transifex.com >> ~/.transifexrc
echo password=${{ secrets.TRANSIFEX_TOKEN }} >> ~/.transifexrc
echo username=api >> ~/.transifexrc
# extract
-
name
:
extract_messages
run
:
|
python setup.py extract_messages
# push source
-
name
:
push_messages
run
:
|
tx push -s
# remove transifex credential file
-
name
:
remove transifexrc file
uses
:
JesseTG/rm@v1.0.2
with
:
path
:
~/.transifexrc
-
name
:
Create Pull Request
uses
:
peter-evans/create-pull-request@v3
uses
:
inveniosoftware/invenio-i18n/.github/workflows/i18n-push-base.yml@master
with
:
commit-message
:
i18n:push translations
title
:
i18n:push translations
body
:
i18n:push translations
branch
:
101-translations-push
# name of branch which PR is created from
delete-branch
:
true
# delete branch once merged,closed
extract-backend
:
true
secrets
:
inherit
This diff is collapsed.
Click to expand it.
.tx/config
+
3
−
2
View file @
53ca6904
...
...
@@ -2,6 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2016-2019 CERN.
# Copyright (C) 2023 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
...
...
@@ -25,9 +26,9 @@
# $ tx pull -a
[main]
host = https://
www
.transifex.com
host = https://
app
.transifex.com
[invenio
.
invenio-previewer-messages]
[
o:
invenio
software:p:invenio:r:
invenio-previewer-messages]
file_filter = invenio_previewer/translations/<lang>/LC_MESSAGES/messages.po
source_file = invenio_previewer/translations/messages.pot
source_lang = en
...
...
This diff is collapsed.
Click to expand it.
run-tests.sh
+
1
−
1
View file @
53ca6904
...
...
@@ -9,7 +9,7 @@
# under the terms of the MIT License; see LICENSE file for more details.
python
-m
check_manifest
--ignore
".*-requirements.txt"
&&
\
python
-m
setup extract_messages
--
dry-run
python
-m
setup extract_messages
--
output-file
/dev/null
python
-m
sphinx.cmd.build
-qnNW
docs docs/_build/html
&&
\
python
-m
pytest
python
-m
sphinx.cmd.build
-qnNW
-b
doctest docs docs/_build/doctest
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment