~adamreichold/qpdfview/trunk

« back to all changes in this revision

Viewing changes to miscellaneous/import-translations.sh

  • Committer: Adam Reichold
  • Date: 2022-11-12 17:46:48 UTC
  • Revision ID: adam.reichold@t-online.de-20221112174648-2rezphhu0ir7w3pr
Tags: qpdfview-0.0.0beta1, qpdfview-0.5beta1
Import updated translations and bump version number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
source_dir=../translations-export
6
6
dest_dir=./translations
7
7
 
8
 
# trap 'rm -f "${temp_file}"' EXIT
9
 
# temp_file="$(mktemp)"
10
 
 
11
8
for source_file in ${source_dir}/*.po
12
9
do
13
10
    locale="$(basename ${source_file} .po)"
15
12
 
16
13
    sed "s/^\"X-Generator:..*/\"X-Qt-Contexts: true\\\\n\"/" "${source_file}" \
17
14
    | sed -r "/^msgctxt \"[^Qq][^:]+\"/ s/^msgctxt \"([^Qq][^:|\"]+)|\"$/msgctxt \"qpdfview::\1/" \
18
 
    | lconvert -if po -i - -o "${dest_file}"
 
15
    | lconvert -if po -i - -o "${dest_file}" -target-language ${locale}
19
16
done
20
17
 
21
18
lupdate -no-obsolete ./qpdfview.pro