diff options
author | Barry Jackson <barjac@mageia.org> | 2023-01-29 11:40:02 +0000 |
---|---|---|
committer | Barry Jackson <barjac@mageia.org> | 2023-01-29 11:40:02 +0000 |
commit | 3678c975311ec9826f7a2b506ba7fbd76aec6f3b (patch) | |
tree | 7e199b5f6605213acec5464e3191f28c6eaf41f7 | |
parent | 1f32de6b5b93258660ef6f0928a806b4a30b33af (diff) | |
download | remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.tar remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.tar.gz remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.tar.bz2 remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.tar.xz remove-old-kernels-3678c975311ec9826f7a2b506ba7fbd76aec6f3b.zip |
fix typo and str quoting
-rwxr-xr-x | mk-pot | 12 | ||||
-rw-r--r-- | po/remove-old-kernels.pot | 2 |
2 files changed, 7 insertions, 7 deletions
@@ -19,24 +19,24 @@ isdupe=1 done # Dupe not found so increment line index and add string to check array ((x++)) - rawarray[$x]="$1" + rawarray[x]="$1" return $isdupe } # Main script starts here rawarray=(); x=0 ; y=0 -# Get raw i18n strings (max two per script line) +# Get raw i18n strings while IFS='' read -r line; do if echo "$line"|grep -q '(i18n'; then # Look for up to 4 occurrences of "$(i18n" in one script line and extract raw text for each for ((i=2;i<5;i++)); do idstr="$(echo "$line"|grep i18n|sed "s/\$(i18n/@/g"|cut -d@ -f${i}|cut -d\" -f2| sed 's/").*//')" - if [[ ${#idstr} > 0 ]]; then + if (( ${#idstr} > 0 )); then # Check it is not dupe if ! chk_dupe "$idstr"; then # Output line IFS='' - echo -e "msgid \""$idstr"\"\nmsgstr \"\"\n" >> $outpot + echo -e "msgid \"""$idstr""\"\nmsgstr \"\"\n" >> $outpot fi else break @@ -53,6 +53,6 @@ sed -i "s/POT-Creation-Date: /&$(date '+%F %R%z')/" $outpot # Update po files with any string changes from the pot file echo "Updating *.po files with any string changes" -pushd po +pushd po || exit 1 make update-po -popd +popd || exit 1 diff --git a/po/remove-old-kernels.pot b/po/remove-old-kernels.pot index ac043ce..7e45d24 100644 --- a/po/remove-old-kernels.pot +++ b/po/remove-old-kernels.pot @@ -7,7 +7,7 @@ msgid "" msgstr "Project-Id-Version: remove-old-kernels\n" "Report-Msgid-Bugs-To: \n" - "POT-Creation-Date: 2023-01-24 19:10+0000\n" + "POT-Creation-Date: 2023-01-29 11:37+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" |