Quellcode durchsuchen

Patch convert_to_memoq to support untranslated segments and add VillageEncounter and mChapter1

master
LecygneNoir vor 4 Jahren
Ursprung
Commit
a3d65c0a6b
7 geänderte Dateien mit 170106 neuen und 5 gelöschten Zeilen
  1. +3891
    -0
      compatibility-tools/VillageEncounters.po
  2. +31032
    -0
      compatibility-tools/VillageEncounters.txt_fre.rtf
  3. +5937
    -0
      compatibility-tools/VillageEncounters.txt_fre.rtf.work
  4. +16
    -5
      compatibility-tools/convert_memoq_to_po.sh
  5. +11675
    -0
      compatibility-tools/mChapter 1.po
  6. +98476
    -0
      compatibility-tools/mChapter 1.txt_fre.rtf
  7. +19079
    -0
      compatibility-tools/mChapter 1.txt_fre.rtf.work

+ 3891
- 0
compatibility-tools/VillageEncounters.po
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 31032
- 0
compatibility-tools/VillageEncounters.txt_fre.rtf
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 5937
- 0
compatibility-tools/VillageEncounters.txt_fre.rtf.work
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 16
- 5
compatibility-tools/convert_memoq_to_po.sh Datei anzeigen

@ -91,8 +91,14 @@ while read -r line; do
# we reach end of story, insert the translated msgstr and reinit
msgstr="${msgstr//'\lang1036 '/}"
msgstr="${msgstr//'\cell }'/}"
echo "msgstr \"\"${msgstr}" >> "${TEMP_PO}"
echo >> "${TEMP_PO}"
# If there is still lang1036 then it means the msgstr is untranslated, insert an empty translation
if [[ ${msgstr} == *"lang1036"* ]]; then
echo "msgstr \"\"" >> "${TEMP_PO}"
echo >> "${TEMP_PO}"
else
echo "msgstr \"\"${msgstr}" >> "${TEMP_PO}"
echo >> "${TEMP_PO}"
fi
comment_story=""
msgstr=""
elif [[ ${line} == *"\noproof [OUT]"* ]]; then
@ -109,15 +115,20 @@ while read -r line; do
line="${line//'"'/'\"'}"
echo "msgid \"${line#\[OUT\]}\"" | tr -d '\r' | tr -d '\n' >> "${TEMP_PO}"
echo >> "${TEMP_PO}"
# Insert an empty msgstr in case of untranslated [OUT]
# (in this case it never matches the \lang1036 [OUT] below so we need to insert it outside)
echo "msgstr \"\"" >> "${TEMP_PO}"
echo >> "${TEMP_PO}"
((out_incr++))
elif [[ ${line} == *"\lang1036 [OUT]"* ]]; then
# It's an out for translated part (with lang1036) so write the msgstr
# It's an out for translated part (with lang1036) so write the msgstr.
line="${line//'\cell }'/}"
line="${line//'\lang1036 '/}"
# Get rid of special character
line="${line//'"'/'\"'}"
encoded_line=$(convert_char_to_utf8 "${line}")
echo "msgstr \"${encoded_line#\[OUT\]}\"" | tr -d '\r' | tr -d '\n' >> "${TEMP_PO}"
# Insert without the msgstr as it has been inserted with the msgid before.
echo "\"${encoded_line#\[OUT\]}\"" | tr -d '\r' | tr -d '\n' >> "${TEMP_PO}"
echo >> "${TEMP_PO}"
elif [[ ${line} == *"[/NODE]"* ]]; then
# We reach end of node, reinit
@ -154,8 +165,8 @@ while read -r line; do
if [[ $(echo "${line}" | grep "lang1036") ]]; then
# Get rid of special character
line="${line//'"'/'\"'}"
# We need a newline between each translated lines
encoded_line=$(convert_char_to_utf8 "${line}")
# We need a newline between each translated lines
msgstr="${msgstr}
\"${encoded_line}\n\""
continue

+ 11675
- 0
compatibility-tools/mChapter 1.po
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 98476
- 0
compatibility-tools/mChapter 1.txt_fre.rtf
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 19079
- 0
compatibility-tools/mChapter 1.txt_fre.rtf.work
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


Laden…
Abbrechen
Speichern