Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve ci#40

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
methane merged 7 commits intopython:3.10fromrffontenelle:improve-CI
Dec 30, 2022
Merged
Changes from1 commit
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
PrevPrevious commit
NextNext commit
Update script to work with the new TX command
Previous solution of patching .tx/config does not work with thenew client, so the script had to be updated with new solution.Now, translations are pulled into a sub-directory of cpython, andthen installed in the languages's repository.Also using 'realpath' tool in ROOTDIR to retrieve absolute path,which actually eases referencing the repository root directory.
  • Loading branch information
@rffontenelle
rffontenelle committedOct 24, 2022
commit5a0df7999a33ee138ee460f44771be702ea3692f
27 changes: 12 additions & 15 deletionsscripts/update.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,9 @@ set -e
# Allow language being passed as 1st argument, defaults to ja
LANGUAGE=${1:-ja}

ROOTDIR=$(dirname $0)/..
ROOTDIR=$(realpath "$(dirname $0)/..")

cd ${ROOTDIR}
cd"${ROOTDIR}"

if ! test -f cpython/Doc/conf.py; then
echo Unable to find proper CPython Doc folder
Expand All@@ -21,22 +21,19 @@ cd cpython/Doc
sphinx-build -E -b gettext -D gettext_compact=0 -d build/.doctrees . locales/pot

# Update CPython's .tx/config
cdlocales
cd locales
sphinx-intl create-txconfig
sphinx-intl update-txconfig-resources -p pot -d . --transifex-project-name python-newest
sphinx-intl update-txconfig-resources -p pot -d . --transifex-organization-name python-doc --transifex-project-name python-newest

if [ "$CI" = true ]
then
if [ "$CI" = true ]; then
tx push --source --no-interactive --skip
fi

# Update the translation project's .tx/config
cd ../../.. # back to $ROOTDIR
mkdir -p .tx
sed cpython/Doc/locales/.tx/config \
-e '/^source_file/d' \
-e 's|<lang>/LC_MESSAGES/||' \
-e "s|^file_filter|trans.${LANGUAGE}|" \
> .tx/config
# Pull translations into cpython/Doc/locales/LANGUAGE/LC_MESSAGES/
tx pull -l ${LANGUAGE} -t --use-git-timestamps -f

tx pull -l ${LANGUAGE} --use-git-timestamps --parallel
# Finally, move downloaded translation files to the language's repository
cd "${LANGUAGE}/LC_MESSAGES/"
for po in $(find . -type f -name '*.po' | sort | sed 's|^\./||'); do
install -Dm644 ${po} "${ROOTDIR}/${po}"
done

[8]ページ先頭

©2009-2025 Movatter.jp