We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcd20ad commit c9d3ab5Copy full SHA for c9d3ab5
1 file changed
README.rst
@@ -175,3 +175,27 @@ Find fuzzy strings:
175
.. code-block:: bash
176
177
grep -c fuzzy **/*.po | grep -v ':1$\|:0$'
178
+
179
180
+Merge pot files from cpython doc:
181
182
+.. code-block:: bash
183
184
+ VERSION=3.6
185
+ git clone --depth 1 --branch $VERSION https://github.com/python/cpython.git /tmp/cpython/
186
+ (cd /tmp/cpython/ && sphinx-build -Q -b gettext -D gettext_compact=0 Doc pot/)
187
+ POT_PATH="/tmp/cpython/pot/"
188
+ PO_PATH="./"
189
190
+ find "$POT_PATH" -name '*.pot' |
191
+ while read -r POT
192
+ do
193
+ PO="$PO_PATH/$(echo "$POT" | sed "s#$POT_PATH##; s#\.pot\$#.po#")"
194
+ mkdir -p "$(dirname "$PO")"
195
+ if [ -f "$PO" ]
196
+ then
197
+ msgmerge --backup=off --force-po -U "$PO" "$POT"
198
+ else
199
+ msgcat -o "$PO" "$POT"
200
+ fi
201
+ done
0 commit comments