|
@ -48,6 +48,8 @@ while read -r line; do |
|
|
# OUT are one line, let's write it to the pot |
|
|
# OUT are one line, let's write it to the pot |
|
|
echo "#. ${comment_out}" | tr -d '\r' | tr -d '\n' >> "${POT}" |
|
|
echo "#. ${comment_out}" | tr -d '\r' | tr -d '\n' >> "${POT}" |
|
|
echo >> "${POT}" |
|
|
echo >> "${POT}" |
|
|
|
|
|
# Get rid of special character |
|
|
|
|
|
line="${line//'"'/'\\"'}" |
|
|
echo "msgid \"${line#\[OUT\]}\"" | tr -d '\r' | tr -d '\n' >> "${POT}" |
|
|
echo "msgid \"${line#\[OUT\]}\"" | tr -d '\r' | tr -d '\n' >> "${POT}" |
|
|
echo >> "${POT}" |
|
|
echo >> "${POT}" |
|
|
echo 'msgstr ""' >> "${POT}" |
|
|
echo 'msgstr ""' >> "${POT}" |
|
@ -67,12 +69,16 @@ while read -r line; do |
|
|
comment_out="" |
|
|
comment_out="" |
|
|
out_incr=1 |
|
|
out_incr=1 |
|
|
elif [[ "${comment_story}" != "" && ${story_first_line} == 1 ]]; then |
|
|
elif [[ "${comment_story}" != "" && ${story_first_line} == 1 ]]; then |
|
|
|
|
|
# Get rid of special character |
|
|
|
|
|
line="${line//'"'/'\\"'}" |
|
|
# If the line has nothing particular, and the comment_story is not empty, it's a story string |
|
|
# If the line has nothing particular, and the comment_story is not empty, it's a story string |
|
|
# As the story_fist_line is set, it's the first line of the story, add the msgid |
|
|
# As the story_fist_line is set, it's the first line of the story, add the msgid |
|
|
echo "msgid \"${line}\"" | tr -d '\r' | tr -d '\n' >> "${POT}" |
|
|
echo "msgid \"${line}\"" | tr -d '\r' | tr -d '\n' >> "${POT}" |
|
|
echo >> "${POT}" |
|
|
echo >> "${POT}" |
|
|
story_first_line=0 |
|
|
story_first_line=0 |
|
|
elif [[ ${comment_story} != "" ]]; then |
|
|
elif [[ ${comment_story} != "" ]]; then |
|
|
|
|
|
# Get rid of special character |
|
|
|
|
|
line="${line//'"'/'\"'}" |
|
|
# We are on a multilines story, write it but without the msgid |
|
|
# We are on a multilines story, write it but without the msgid |
|
|
# Also as this is multiline, we need to add \n to the previous line (no way to detect it sooner...) |
|
|
# Also as this is multiline, we need to add \n to the previous line (no way to detect it sooner...) |
|
|
sed -e '$s/\(.*\)"$/\1\\n"/' -i "${POT}" |
|
|
sed -e '$s/\(.*\)"$/\1\\n"/' -i "${POT}" |
|
|