Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarIthawi committed Oct 27, 2023
1 parent b17018b commit 94c483c
Show file tree
Hide file tree
Showing 94 changed files with 1,190 additions and 638 deletions.
80 changes: 39 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ on:

jobs:
# Run unit and integration tests for Python
python-tests:
tests:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
statuses: write
steps:
# Clones the openedx-translations repo
- name: clone openedx/openedx-translations
uses: actions/checkout@v3

- name: Install gettext
run: |
sudo apt install -y gettext
run: sudo apt install -y gettext

- name: setup python
uses: actions/setup-python@v4
Expand All @@ -28,19 +30,6 @@ jobs:
make test_requirements
make test
# Validate translation files
validate-po-files:
needs: python-tests
runs-on: ubuntu-latest
steps:
- name: clone openedx/openedx-translations
uses: actions/checkout@v3

- name: Install gettext
run: |
sudo apt install -y gettext
- name: Allow editing translation files for bot pull requests
env:
# secrets can't be used in job conditionals, so we set them to env here
Expand All @@ -67,28 +56,53 @@ jobs:
exit $has_errors
- name: Commit changes to git
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
- name: Commit fixes to git
id: commit_fixes
if: ${{ github.event.repository.full_name == github.event.pull_request.head.repo.full_name }}
run: |
# Commit if there are changes to translation files
if ! git diff --no-ext-diff --quiet --exit-code; then
# Set the git user to the bot user to enable commit
git config --global user.email "[email protected]"
git config --global user.name "edx-transifex-bot"
git add .
git commit -m "fix: mark invalid entries as fuzzy" -- translations/
# Switch from the merge commit to the pull request branch to enable push
git checkout "${{ github.head_ref }}"
git add translations/
git commit --message "fix: mark invalid entries as fuzzy" translations/
git push
echo "FUZZY_FIX_COMMIT_SHA=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
else
echo "No changes to commit"
fi
- name: Allow merging the fuzzy fix commit
uses: actions/github-script@v6
if: ${{ steps.commit_fixes.outputs.FUZZY_FIX_COMMIT_SHA }}
with:
script: |
await github.rest.repos.createCommitStatus({
context: 'tests',
description: 'ci.yml: Forced success status.',
owner: context.repo.owner,
repo: context.repo.repo,
sha: '${{ steps.commit_fixes.outputs.FUZZY_FIX_COMMIT_SHA }}',
state: 'success',
})
- name: Post translation validation results as a pull request comment
# Due to GitHub Actions security reasons posting a comment isn't possible on fork pull requests.
# This shouldn't be an issue, because bots writes directly to this repository.
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
if: ${{ always() && github.event.repository.full_name == github.event.pull_request.head.repo.full_name }}
uses: mshick/add-pr-comment@7c0890544fb33b0bdd2e59467fbacb62e028a096
with:
message: |
:white_check_mark: All translation files are valid.
```
${{ steps.validate_translation_files.outputs.ERROR_LOG }}
${{ steps.validate_translation_files.outputs.ERROR_LOG || 'No errors were reported.' }}
```
This comment has been posted by the `validate-translation-files.yml` GitHub Actions workflow.
Expand All @@ -97,28 +111,12 @@ jobs:
:warning: There are errors in the translation files:
```
${{ steps.validate_translation_files.outputs.ERROR_LOG }}
${{ steps.validate_translation_files.outputs.ERROR_LOG || 'No errors were reported.' }}
```
This comment has been posted by the `validate-translation-files.yml` GitHub Actions workflow.
# Run commitlint on the commit messages in a pull request.
commitlint:
needs: validate-po-files
uses: openedx/.github/.github/workflows/commitlint.yml@master


# Automatically merge pull requests created by the "Transifex Integration" github app
# https://github.com/apps/transifex-integration
automerge-transifex-app-pr:
needs: commitlint
runs-on: ubuntu-latest
# Merges the pull request
steps:
- name: clone repository
uses: actions/checkout@v3
- name: auto-merge pull request
- name: Auto-merge pull request
env:
# secrets can't be used in job conditionals, so we set them to env here
TRANSIFEX_APP_ACTOR_NAME: "${{ secrets.TRANSIFEX_APP_ACTOR_NAME }}"
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Run commitlint on the commit messages in a pull request.

name: Lint Commit Messages

on:
- pull_request

jobs:
commitlint:
uses: openedx/.github/.github/workflows/commitlint.yml@master
1 change: 1 addition & 0 deletions .github/workflows/extract-translation-source-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- completion
- course-discovery
- credentials
- credentials-themes
- DoneXBlock
- edx-ace
- edx-bulk-grades
Expand Down
4 changes: 1 addition & 3 deletions docs/decisions/0002-mark-fuzzy-entries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ combined into one single workflow with multiple jobs:
excluded from ``.mo`` files
#. Revalidate the files

#. Commit the updated entries
#. Run ``commitlint``
#. Push updated entries to the PR branch
#. Commit the updated entries and push to the PR branch
#. Automatically merge the PR


Expand Down
8 changes: 8 additions & 0 deletions transifex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ git:
source_file_dir: translations/credentials/credentials/conf/locale/en/
translation_files_expression: 'translations/credentials/credentials/conf/locale/<lang>/'

# credentials-themes
- filter_type: dir
file_format: PO
source_file_extension: po
source_language: en
source_file_dir: translations/credentials-themes/edx_credentials_themes/conf/locale/en/
translation_files_expression: 'translations/credentials-themes/edx_credentials_themes/conf/locale/<lang>/'

# DoneXBlock
- filter_type: dir
file_format: PO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-23 00:19+0000\n"
"POT-Creation-Date: 2023-10-27 00:19+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: edx-platform\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-23 00:20+0000\n"
"POT-Creation-Date: 2023-10-27 00:20+0000\n"
"PO-Revision-Date: 2016-05-25 15:41+0000\n"
"Last-Translator: Muhammad Ayub khan <[email protected]>\n"
"Language-Team: English (http://www.transifex.com/open-edx/edx-platform/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: edx-platform\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-23 00:20+0000\n"
"POT-Creation-Date: 2023-10-27 00:20+0000\n"
"PO-Revision-Date: 2016-05-25 15:41+0000\n"
"Last-Translator: harshit jain <[email protected]>, 2021\n"
"Language-Team: English (http://www.transifex.com/open-edx/edx-platform/"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# edX translation file.
# Copyright (C) 2023 EdX
# This file is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.
# EdX Team <[email protected]>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-06-13 08:00+0000\n"
"PO-Revision-Date: 2023-06-13 09:00+0000\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <[email protected]>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: templates/edx.org/_footer.html:7
msgid "Legal Policies"
msgstr ""

#: templates/edx.org/_footer.html:11
msgid "Terms of Service & Honor Code"
msgstr ""

#: templates/edx.org/_footer.html:16
msgid "Privacy Policy"
msgstr ""

#: templates/edx.org/_footer.html:21
msgid "Cookie Policy"
msgstr ""

#: templates/edx.org/_footer.html:26
msgid "Your Privacy Choices"
msgstr ""

#: templates/edx.org/_footer.html:36
msgid ""
"All rights reserved except where noted. edX, Open edX and the edX and Open "
"edX logos are registered trademarks or trademarks of edX Inc."
msgstr ""

#: templates/edx.org/_footer.html:46
msgid "Powered by"
msgstr ""

#: templates/edx.org/credentials/programs/base.html:30
msgid "About edX"
msgstr ""

#: templates/edx.org/credentials/programs/base.html:33
#, python-brace-format
msgid ""
"{link_start} edX{link_end} offers interactive online classes and MOOCs from "
"the world’s best universities, including MIT, Harvard, Berkeley, University "
"of Texas, and many others. edX is an online initiative created by founding "
"partners Harvard and MIT."
msgstr ""

#. Translators: MicroBachelors should not be translated, this phrase is
#. preceded by the learner's name and followed by a program title
#: templates/edx.org/credentials/programs/microbachelors/certificate.html:7
msgid ""
"has successfully completed all courses and received passing grades to earn a"
" MicroBachelors program certificate in"
msgstr ""

#. Translators: MicroBachelors should not be translated
#: templates/edx.org/credentials/programs/microbachelors/certificate.html:12
msgid "MicroBachelors program certificate"
msgstr ""

#. Translators: MicroBachelors should not be translated
#: templates/edx.org/credentials/programs/microbachelors/certificate.html:17
msgid "About the edX MicroBachelors program certificate"
msgstr ""

#. Translators: MicroBachelors should not be translated
#: templates/edx.org/credentials/programs/microbachelors/certificate.html:22
#, python-brace-format
msgid ""
"An edX MicroBachelors credential signifies that the learner has completed a "
"group of courses that add up to a rich understanding of an area of study. "
"Completion of MicroBachelors programs requires that learners earn "
"{link_start}Verified Certificates{link_end} from each of the courses "
"included in the program."
msgstr ""

#. Translators: MicroMasters should not be translated
#: templates/edx.org/credentials/programs/micromasters/certificate.html:8
#, python-format
msgid ""
"You worked hard to earn your MicroMasters Credential from "
"%(organization_name)s."
msgstr ""

#. Translators: MicroMasters should not be translated, this phrase is preceded
#. by the learner's name and followed by a program title
#: templates/edx.org/credentials/programs/micromasters/certificate.html:16
msgid ""
"has successfully completed all courses and received passing grades to earn a"
" MicroMasters program certificate in"
msgstr ""

#. Translators: MicroMasters should not be translated
#: templates/edx.org/credentials/programs/micromasters/certificate.html:21
msgid "MicroMasters program certificate"
msgstr ""

#. Translators: MicroMasters should not be translated
#: templates/edx.org/credentials/programs/micromasters/certificate.html:26
msgid "About the edX MicroMasters credential"
msgstr ""

#. Translators: MicroMasters should not be translated
#: templates/edx.org/credentials/programs/micromasters/certificate.html:31
#, python-brace-format
msgid ""
"An edX MicroMasters credential signifies that the learner has completed a "
"group of courses that add up to a rich understanding of an area of study. "
"Completion of MicroMasters Programs requires that learners earn "
"{link_start}Verified Certificates{link_end} from each of the courses "
"included in the Program."
msgstr ""

#. Translators: This phrase is preceded by the learner's name and followed by
#. a program title
#: templates/edx.org/credentials/programs/professional-certificate/certificate.html:7
msgid ""
"successfully completed all courses and received passing grades for a "
"Professional Certificate in"
msgstr ""

#: templates/edx.org/credentials/programs/professional-certificate/certificate.html:11
msgid "Professional Certificate"
msgstr ""

#: templates/edx.org/credentials/programs/professional-certificate/certificate.html:15
msgid "About the edX Professional Certificate"
msgstr ""

#: templates/edx.org/credentials/programs/professional-certificate/certificate.html:19
#, python-brace-format
msgid ""
"An edX Professional Certificate signifies that the learner has completed a "
"group of courses that add up to a rich understanding of an area of study. "
"Completion of Professional Certificate Programs requires that learners earn "
"{link_start}Verified Certificates{link_end} from each of the courses "
"included in the Program."
msgstr ""

#. Translators: XSeries should not be translated
#: templates/edx.org/credentials/programs/xseries/certificate.html:8
#, python-format
msgid ""
"You worked hard to earn your XSeries Program certificate from "
"%(organization_name)s."
msgstr ""

#. Translators: XSeries should not be translated, this phrase is preceded by
#. the learner's name and followed by a program title
#: templates/edx.org/credentials/programs/xseries/certificate.html:16
msgid ""
"has successfully completed all courses and received passing grades for an "
"XSeries Program certificate in"
msgstr ""

#. Translators: XSeries should not be translated
#: templates/edx.org/credentials/programs/xseries/certificate.html:21
msgid "XSeries Program certificate"
msgstr ""

#. Translators: XSeries should not be translated
#: templates/edx.org/credentials/programs/xseries/certificate.html:26
msgid "About the edX XSeries Program certificate"
msgstr ""

#. Translators: XSeries should not be translated
#: templates/edx.org/credentials/programs/xseries/certificate.html:31
#, python-brace-format
msgid ""
"An edX XSeries Program certificate signifies that the learner has completed "
"a group of courses that add up to a rich understanding of an area of study. "
"Completion of XSeries Programs requires that learners earn "
"{link_start}Verified Certificates{link_end} from each of the courses "
"included in the Program."
msgstr ""
Loading

0 comments on commit 94c483c

Please sign in to comment.