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

feat: Persian translations added #41

Merged
merged 5 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
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 ${{ matrix.python-version }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove ${{ matrix.python-version }} because we are no longer using it now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

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 @@ -41,7 +41,13 @@ on LMS

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
Loading