diff options
Diffstat (limited to 'subprojects/freeamo/src/make-wiki')
-rw-r--r-- | subprojects/freeamo/src/make-wiki | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/subprojects/freeamo/src/make-wiki b/subprojects/freeamo/src/make-wiki index 784a7a4..7114bb8 100644 --- a/subprojects/freeamo/src/make-wiki +++ b/subprojects/freeamo/src/make-wiki @@ -70,20 +70,18 @@ while IFS= read -r table; do elif [ "$license__amo_full_name" == "Mozilla Public License Version 1.1" ]; then license__fsd_short_name="MPLv1.1"; fi - # Start description code + # Start localization code source "$run_path/src/main_functions" - locale_description="summary" - do-locale - locale_description="description" - do-locale - short_description=$(echo "$summary" | format_description) - full_description=$(echo "$description" | format_description) + + locale_description="summary"; do-locale; short_description=$(echo "$summary" | format_description) + locale_description="description"; do-locale; full_description=$(echo "$description" | format_description) + locale_description="homepage"; do-locale + locale_description="support_url"; do-locale - # End description code + # End localization code # The homepage field is mandatory so let's remove "null" from it because we don't need to evaluat it - homepage_url=$(jq .results[$entry].homepage "$file" | sed "s|en-US|en_US|;" | jq -r .en_US | sed "s|null||"); license_copyright=$(jq -r .results[$entry].authors[].name "$file" ); bayesian_average=$(jq .results[$entry].ratings.bayesian_average "$file"); bayesian_average__simple=$(printf "%.1f" "${bayesian_average//./,}"); @@ -115,15 +113,15 @@ while IFS= read -r table; do - github_true=$(echo "$homepage_url" | grep "github.com") ||: # ok if grep fails + github_true=$(echo "$homepage" | grep "github.com") ||: # ok if grep fails if [[ $github_true != "" ]]; then # Always use https, and remove anchors - homepage_url__for__vcs_checkout_command="https://github.com$(echo "$github_true" | sed "s|https://github.com||; s|http://github.com||; s|#|\\n|;" | head -n 1)"; + homepage__for__vcs_checkout_command="https://github.com$(echo "$github_true" | sed "s|https://github.com||; s|http://github.com||; s|#|\\n|;" | head -n 1)"; # Remove trailing slash - homepage_url__for__vcs_checkout_command="${homepage_url__for__vcs_checkout_command%/}" - vcs_checkout_command="git clone $homepage_url__for__vcs_checkout_command.git"; + homepage__for__vcs_checkout_command="${homepage__for__vcs_checkout_command%/}" + vcs_checkout_command="git clone $homepage__for__vcs_checkout_command.git"; fi @@ -159,7 +157,7 @@ while IFS= read -r table; do echo "|Name=$name |Short description=$short_description |Full description=$full_description -|Homepage URL=$homepage_url +|Homepage URL=$homepage |Extension of=$extension_of |VCS checkout command=$vcs_checkout_command |Documentation note=Extra data (https://addons.mozilla.org/api/v$api_version/addons/addon/$slug/): |