Skip to content

Commit

Permalink
feat: Persian translations added (#41)
Browse files Browse the repository at this point in the history
* feat: Persian translations added

* docs: i18_tool step added to work with translations
  • Loading branch information
CodeWithEmad authored Sep 20, 2024
1 parent d29f41e commit 1ed45c3
Show file tree
Hide file tree
Showing 6 changed files with 313 additions and 62 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]
pull_request:
branches:
- '**'
- "**"

jobs:
cypress-run:
Expand All @@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-python@v5
id: setup_python
with:
python-version: '3.12'
python-version: "3.12"
- name: install dependencies of xblock-sdk
working-directory: xblock-sdk
run: |
Expand All @@ -38,8 +38,8 @@ jobs:
- name: Run xblock workbench
working-directory: xblock-sdk
env:
EXCLUDE_SAMPLE_XBLOCKS: yes
run: |
EXCLUDE_SAMPLE_XBLOCKS: yes
run: |
python3 manage.py migrate --noinput
python3 ./manage.py runserver &
Expand Down
43 changes: 21 additions & 22 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,30 @@ name: Publish package to PyPi
on:
push:
tags:
- '*'
- "*"

jobs:
push:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/h5p-xblock
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

push:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/h5p-xblock
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel
- name: Install setuptools and wheel
run: python -m pip install --upgrade pip setuptools wheel

- name: Build package
run: python setup.py sdist bdist_wheel
- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ Please ensure that your bucket is publicly accessible to enable seamless content

You can help by translating this project. Follow the steps below:

1. You need `i18n_tool` to "collect" and "compile" translations. If you already have it, proceed to the next item; otherwise:

```bash
pip install git+https://github.com/openedx/i18n-tools
```

1. Create a folder for the translations in `locale/`, eg: `locale/es_419/LC_MESSAGES/`, and create your `text.po` file
with all the translations.
2. Run `make compile_translations`, this will generate the `text.mo` file.
3. Create a pull request with your changes.
1. Run `make compile_translations`, this will generate the `text.mo` file.
1. Create a pull request with your changes.
98 changes: 64 additions & 34 deletions h5pxblock/locale/en/LC_MESSAGES/text.po
Original file line number Diff line number Diff line change
Expand Up @@ -21,121 +21,151 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: h5pxblock.py:41
#: h5pxblock.py:63
msgid "Not attempted"
msgstr ""

#: h5pxblock.py:64
msgid "Completed"
msgstr ""

#: h5pxblock.py:75
msgid "H5P Player Id"
msgstr ""

#: h5pxblock.py:42
#: h5pxblock.py:76
msgid "Unique ID for player instance"
msgstr ""

#: h5pxblock.py:48
#: h5pxblock.py:82
msgid "Display Name"
msgstr ""

#: h5pxblock.py:49
#: h5pxblock.py:83
msgid "Display name for this module"
msgstr ""

#: h5pxblock.py:55 h5pxblock.py:56
#: h5pxblock.py:89 h5pxblock.py:90
msgid "Upload H5P content"
msgstr ""

#: h5pxblock.py:61
#: h5pxblock.py:95
msgid "Show H5P player frame"
msgstr ""

#: h5pxblock.py:62
#: h5pxblock.py:96
msgid "whether to show H5P player frame and button"
msgstr ""

#: h5pxblock.py:68
#: h5pxblock.py:102
msgid "Show copyright button"
msgstr ""

#: h5pxblock.py:69
#: h5pxblock.py:103
msgid "whether to show copyright button"
msgstr ""

#: h5pxblock.py:75
#: h5pxblock.py:109
msgid "Show h5p icon"
msgstr ""

#: h5pxblock.py:76
#: h5pxblock.py:110
msgid "whether to show h5p icon"
msgstr ""

#: h5pxblock.py:82
#: h5pxblock.py:116
msgid "Show fullscreen button"
msgstr ""

#: h5pxblock.py:83
#: h5pxblock.py:117
msgid "whether to show fullscreen button"
msgstr ""

#: h5pxblock.py:89
#: h5pxblock.py:123
msgid "Is Scorable"
msgstr ""

#: h5pxblock.py:91
#: h5pxblock.py:125
msgid "Select True if this component will save score"
msgstr ""

#: h5pxblock.py:98
#: h5pxblock.py:132
msgid "User content state save frequency"
msgstr ""

#: h5pxblock.py:100
#: h5pxblock.py:134
msgid ""
"How often current user content state should be autosaved (in seconds). Set "
"it to zero if you don't want to save content state."
msgstr ""

#: h5pxblock.py:108
#: h5pxblock.py:142
msgid "User previous content interaction states"
msgstr ""

#: h5pxblock.py:114
#: h5pxblock.py:148
msgid "Problem Weight"
msgstr ""

#: h5pxblock.py:116
#: h5pxblock.py:150
msgid ""
"Defines the number of points this problem is worth. If the value is not set, "
"the problem is worth one point."
"Defines the number of points this problem is worth. If the value is not set,"
" the problem is worth one point."
msgstr ""

#: h5pxblock.py:125
#: h5pxblock.py:159
msgid "Maximum score"
msgstr ""

#: h5pxblock.py:126
#: h5pxblock.py:160
msgid "Maximum grade score given to assignment by staff."
msgstr ""

#: h5pxblock.py:217
#: h5pxblock.py:166
msgid "Problem weighted score"
msgstr ""

#: h5pxblock.py:168
msgid ""
"Defines the weighted score of this problem. If the value is not set, the "
"problem is worth one point."
msgstr ""

#: h5pxblock.py:176
msgid "Submission status"
msgstr ""

#: h5pxblock.py:177
msgid "The submission status of the assignment."
msgstr ""

#: h5pxblock.py:263
msgid "Uploading"
msgstr ""

#: h5pxblock.py:218
#: h5pxblock.py:264
msgid "Uploaded"
msgstr ""

#: h5pxblock.py:219
#: h5pxblock.py:265
msgid "Extracting"
msgstr ""

#: static/html/h5pxblock.html:7
#: static/html/h5pxblock.html:6
msgid "points"
msgstr ""

#: static/html/h5pxblock.html:10
msgid "Loading..."
msgstr ""

#: static/html/h5pxblock.html:13
#: static/html/h5pxblock.html:16
msgid ""
"The due date for this subsection has passed. Your response will be recorded, "
"but not graded."
"The due date for this subsection has passed. Your response will be recorded,"
" but not graded."
msgstr ""

#: static/html/h5pxblock.html:18
#: static/html/h5pxblock.html:21
msgid "No content. Please upload H5P content."
msgstr ""

Expand All @@ -153,8 +183,8 @@ msgstr ""

#: static/html/studio.html:31
msgid ""
"Enter path of existing content or copy path to reuse this content in another "
"block"
"Enter path of existing content or copy path to reuse this content in another"
" block"
msgstr ""

#: static/html/studio.html:40 static/html/studio.html:57
Expand Down
Binary file added h5pxblock/locale/fa/LC_MESSAGES/text.mo
Binary file not shown.
Loading

0 comments on commit 1ed45c3

Please sign in to comment.