File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -175,3 +175,27 @@ Find fuzzy strings:
175
175
.. code-block :: bash
176
176
177
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
You can’t perform that action at this time.
0 commit comments