diff options
author | david <public@beloved.name> | 2018-07-26 23:29:40 +0200 |
---|---|---|
committer | david <public@beloved.name> | 2018-07-26 23:29:40 +0200 |
commit | 4cb3a60a348b5362927bf5225d1c1367d461d401 (patch) | |
tree | 2d354edadc04e0e6812f18b4e6363faa198beb64 /subprojects/freeamo/src/main_functions | |
parent | 931df51d9354e0c67e7329096de86411270a5db7 (diff) |
Imrpoved locatliztion variable names with underscore
Diffstat (limited to 'subprojects/freeamo/src/main_functions')
-rw-r--r-- | subprojects/freeamo/src/main_functions | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/subprojects/freeamo/src/main_functions b/subprojects/freeamo/src/main_functions index 06ddad6..88de297 100644 --- a/subprojects/freeamo/src/main_functions +++ b/subprojects/freeamo/src/main_functions @@ -65,8 +65,8 @@ function do-locale { echo "####################" - tmp__enUS=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq -r .enUS ) - tmp__enGB=$(jq ".results[$entry].$locale_description" "$file" | sed "s|-||;" | jq -r .enGB ) + tmp__en_US=$(jq ".results[$entry].$locale_description" "$file" | sed "s|en-US|en_US|" | jq -r .en_US ) + tmp__en_GB=$(jq ".results[$entry].$locale_description" "$file" | sed "s|en-GB|en_GB|" | jq -r .en_GB ) # Use the first avalible if English is not avaliable tmp=$(jq -r ".results[$entry].$locale_description[]" "$file" | head -n 1) || [[ $? == 141 ]] # jq causes superfluous 141 @@ -75,40 +75,40 @@ echo "####################" # if [ "$tmp" == "" ]; then # # # Some entries doesn't provide any `description` field but only a `summary` field. -# tmp=$(jq ".results[$entry].summary[]" "$file" | head -n 1 | sed "s|-||;"); +# tmp=$(jq ".results[$entry].summary[]" "$file" | head -n 1 | sed "s|-|_|"); # #fi - if [ "$tmp__enUS" != "null" ]; then + if [ "$tmp__en_US" != "null" ]; then if [ "$locale_description" == "name" ]; then - name="$tmp__enUS"; + name="$tmp__en_US"; elif [ "$locale_description" == "summary" ]; then - summary="$tmp__enUS"; + summary="$tmp__en_US"; elif [ "$locale_description" == "description" ]; then - description="$tmp__enUS"; + description="$tmp__en_US"; fi - elif [ "$tmp__enGB" != "null" ]; then + elif [ "$tmp__en_GB" != "null" ]; then if [ "$locale_description" == "name" ]; then - name="$tmp__enGB"; + name="$tmp__en_GB"; elif [ "$locale_description" == "summary" ]; then - summary="$tmp__enGB"; + summary="$tmp__en_GB"; elif [ "$locale_description" == "description" ]; then - description="$tmp__enGB"; + description="$tmp__en_GB"; fi @@ -163,7 +163,7 @@ function amo_variables() { function amo_variables__licenses { - license__amo_full_name="$(jq ".license.name" "$run_path/build/json/current_versions/$current_version__id.json" | sed "s|en-US|enUS|;" | jq -r .enUS)" + license__amo_full_name="$(jq ".license.name" "$run_path/build/json/current_versions/$current_version__id.json" | sed "s|en-US|en_US|;" | jq -r .en_US)" } |