mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 01:52:28 +08:00
fix(script): paths on translation script
This commit is contained in:
parent
f97bd77117
commit
f85ef444f4
@ -25,9 +25,10 @@ stats() {
|
|||||||
# Print the number of existing strings on the JSON files for each locale
|
# Print the number of existing strings on the JSON files for each locale
|
||||||
s=$(number_of_keys "${paths[0]}/en/server.json")
|
s=$(number_of_keys "${paths[0]}/en/server.json")
|
||||||
c=$(number_of_keys "${paths[1]}/en/translation.json")
|
c=$(number_of_keys "${paths[1]}/en/translation.json")
|
||||||
echo "| locale |server strings |client strings |"
|
echo "| locale | server strings | client strings |"
|
||||||
echo "|--------|---------------|---------------|"
|
echo "|--------|----------------|----------------|"
|
||||||
echo "| en | ${s} | ${c} |"
|
echo "| en | ${s} | ${c} |"
|
||||||
|
echo "|--------|----------------|----------------|"
|
||||||
for locale in "${locales[@]}"; do
|
for locale in "${locales[@]}"; do
|
||||||
s=$(number_of_keys "${paths[0]}/${locale}/server.json")
|
s=$(number_of_keys "${paths[0]}/${locale}/server.json")
|
||||||
c=$(number_of_keys "${paths[1]}/${locale}/translation.json")
|
c=$(number_of_keys "${paths[1]}/${locale}/translation.json")
|
||||||
@ -78,7 +79,10 @@ file_path="$(
|
|||||||
cd -- "$(dirname "${0}")" >/dev/null 2>&1 || exit
|
cd -- "$(dirname "${0}")" >/dev/null 2>&1 || exit
|
||||||
pwd -P
|
pwd -P
|
||||||
)"
|
)"
|
||||||
paths=("${file_path}/../translations/" "${file_path}/../src/public/translations/")
|
paths=(
|
||||||
|
"${file_path}/../../apps/server/src/assets/translations/"
|
||||||
|
"${file_path}/../../apps/client/src/translations/"
|
||||||
|
)
|
||||||
locales=(cn de es fr pt_br ro tw)
|
locales=(cn de es fr pt_br ro tw)
|
||||||
|
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user