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

Commit4c5c4a2

Browse files
committed
Move locales directory inside source dir
1 parentf5d080f commit4c5c4a2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
pip install -r requirements.txt
7171
-name:Remove locale file for testing
7272
shell:bash
73-
run:rm -rf locales/pt_BR/
73+
run:rm -rfpython_docs_theme/locales/pt_BR/
7474
-run:python babel_runner.py extract
7575
-run:python babel_runner.py init -l pt_BR
7676
-run:python babel_runner.py update
@@ -79,10 +79,10 @@ jobs:
7979
-run:python babel_runner.py compile -l pt_BR
8080
-name:Print .pot file
8181
shell:bash
82-
run:cat locales/messages.pot
82+
run:catpython_docs_theme/locales/messages.pot
8383
-name:Print .po file
8484
shell:bash
85-
run:cat locales/pt_BR/LC_MESSAGES/messages.po
85+
run:catpython_docs_theme/locales/pt_BR/LC_MESSAGES/messages.po
8686
-name:list files in locales dir
8787
shell:bash
88-
run:ls -R locales/
88+
run:ls -Rpython_docs_theme/locales/

‎babel_runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/venv python3
1+
#!/usr/bin/env python3
22
"""Script for handling translations with Babel"""
33
from __future__importannotations
44

@@ -24,9 +24,9 @@
2424
# Global variables used by pybabel below (paths relative to PROJECT_DIR)
2525
DOMAIN="messages"
2626
COPYRIGHT_HOLDER="Python Software Foundation"
27-
LOCALES_DIR="locales"
28-
POT_FILE=Path(LOCALES_DIR,f"{DOMAIN}.pot")
2927
SOURCE_DIR="python_docs_theme"
28+
LOCALES_DIR=Path(SOURCE_DIR,"locales")
29+
POT_FILE=Path(LOCALES_DIR,f"{DOMAIN}.pot")
3030
MAPPING_FILE=".babel.cfg"
3131

3232

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp