mirror of
https://github.com/monero-project/monero-site.git
synced 2025-01-28 18:56:33 +02:00
commit
6b1de55123
@ -2,22 +2,22 @@
|
|||||||
|
|
||||||
# SCRIPT
|
# SCRIPT
|
||||||
#
|
#
|
||||||
# This script loops through all the .config files in this folder and run po4a on them. The config files are one for each user guide.
|
# This script loops through all the .config files in this folder and run po4a on them. The config files are one for each user guide and moneropedia entry.
|
||||||
# See the next section for instructions about adding new config files.
|
# See the next section for instructions about adding new config files.
|
||||||
#
|
#
|
||||||
# CONFIG FILES
|
# CONFIG FILES
|
||||||
#
|
#
|
||||||
# The config files give a set of instructions to po4a, which will update all translations files (.pot and .po) and documents (.md) at the same time.
|
# The config files give a set of instructions to po4a, which will update all translations files (.pot and .po) and documents (.md) at the same time.
|
||||||
# we use --keep=0 to transfer all translated content directly to the original markdown file, but would be good to switch to a more reasonable thresold
|
# we use --keep=0 to transfer all translated content directly to the original markdown file, but would be good to switch to a more reasonable thresold
|
||||||
# (maybe the standard 80%?) in the future, when the guides will be mostly translated.
|
# (maybe the standard 80%?) in the future, when the guides and moneropedia entries will be mostly translated.
|
||||||
#
|
#
|
||||||
# To avoid spamming unnecessary diffs, we didn't add all config files for all guides. A new config file should be added
|
# To avoid spamming unnecessary diffs, we didn't add all config files for all guides or entries. A new config file should be added
|
||||||
# when the translation files and the guides themselves need to be updated (so, when the original document got changed and
|
# when the translation files and the guides or moneropedia entries themselves need to be updated (so, when the original document got changed and
|
||||||
# the changes need to be transferred to the translation files). To add a new config file to be managed by po4a:
|
# the changes need to be transferred to the translation files). To add a new config file to be managed by po4a:
|
||||||
#
|
#
|
||||||
# 1. Copy one of the other .config files and rename it to the filename of the guide it's going to point to (for example, for the user guide
|
# 1. Copy one of the other .config files and rename it to the filename of the guide/entry it's going to point to (for example, for the user guide
|
||||||
# 'verification-allos-advanced.md' we will create a config file named 'verification-allos-advanced.config').
|
# 'verification-allos-advanced.md' we will create a config file named 'verification-allos-advanced.config').
|
||||||
# 2.change the strings starting with [po4a_paths] and [type: markdown] using this structure:
|
# 2. Change the strings starting with [po4a_paths] and [type: markdown] using this structure:
|
||||||
# [po4a_paths] ../_i18n/en/resources/user-guides/weblate/<GUIDE.pot> $lang:../_i18n/$lang/resources/user-guides/weblate/<GUIDE.po>
|
# [po4a_paths] ../_i18n/en/resources/user-guides/weblate/<GUIDE.pot> $lang:../_i18n/$lang/resources/user-guides/weblate/<GUIDE.po>
|
||||||
# 3. At the bottom of the file, change the '[type: markdown]' instruction:
|
# 3. At the bottom of the file, change the '[type: markdown]' instruction:
|
||||||
# [type: markdown] ../_i18n/en/resources/user-guides/<GUIDE.md> $lang:../_i18n/$lang/resources/user-guides/<GUIDE.md>
|
# [type: markdown] ../_i18n/en/resources/user-guides/<GUIDE.md> $lang:../_i18n/$lang/resources/user-guides/<GUIDE.md>
|
||||||
@ -37,6 +37,10 @@ updatelangs() {
|
|||||||
echo "-> Running po4a on ${guide}"
|
echo "-> Running po4a on ${guide}"
|
||||||
po4a $guide || echo "ERROR: something went wrong, po4a didn't run succesfully on ${guide}"
|
po4a $guide || echo "ERROR: something went wrong, po4a didn't run succesfully on ${guide}"
|
||||||
done
|
done
|
||||||
|
for entry in moneropedia/*.config; do
|
||||||
|
echo "-> Running po4a on ${entry}"
|
||||||
|
po4a $entry || echo "ERROR: something went wrong, po4a didn't run succesfully on ${entry}"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
Loading…
Reference in New Issue
Block a user