diff --git a/contrib/extract_translations/extract_translations.erl b/contrib/extract_translations/extract_translations.erl index 467100236..70304761a 100644 --- a/contrib/extract_translations/extract_translations.erl +++ b/contrib/extract_translations/extract_translations.erl @@ -242,9 +242,7 @@ print_usage() -> print_po_header(File) -> MsgProps = get_msg_header_props(File), {Language, [LastT | AddT]} = prepare_props(MsgProps), - application:load(ejabberd), - {ok, Version} = application:get_key(ejabberd, vsn), - print_po_header(Version, Language, LastT, AddT). + print_po_header(Language, LastT, AddT). get_msg_header_props(File) -> {ok, F} = file:open(File, [read]), @@ -274,12 +272,11 @@ prepare_props(MsgProps) -> Authors = proplists:get_all_values("Author:", MsgProps), {Language, Authors}. -print_po_header(Version, Language, LastTranslator, AdditionalTranslatorsList) -> +print_po_header(Language, LastTranslator, AdditionalTranslatorsList) -> AdditionalTranslatorsString = build_additional_translators(AdditionalTranslatorsList), HeaderString = "msgid \"\"\n" "msgstr \"\"\n" - "\"Project-Id-Version: " ++ Version ++ "\\n\"\n" ++ "\"X-Language: " ++ Language ++ "\\n\"\n" "\"Last-Translator: " ++ LastTranslator ++ "\\n\"\n" ++ AdditionalTranslatorsString ++ diff --git a/contrib/extract_translations/prepare-translation.sh b/contrib/extract_translations/prepare-translation.sh index 56f999247..98c282cc1 100755 --- a/contrib/extract_translations/prepare-translation.sh +++ b/contrib/extract_translations/prepare-translation.sh @@ -157,7 +157,7 @@ extract_lang_srcmsg2po () echo $MSGS_PATH cd $SRC_DIR - $ERL -pa $EXTRACT_DIR -pa $EBIN_DIR -pa $EJA_SRC_DIR -pa /lib/ejabberd/include -noinput -noshell -s extract_translations -s init stop -extra -srcmsg2po . $MSGS_PATH >$PO_PATH.1 + $ERL -pa $EXTRACT_DIR -pa $EBIN_DIR -pa $EJA_SRC_DIR -pa ../include -noinput -noshell -s extract_translations -s init stop -extra -srcmsg2po . $MSGS_PATH >$PO_PATH.1 sed -e 's/ \[\]$/ \"\"/g;' $PO_PATH.1 > $PO_PATH.2 msguniq --sort-by-file $PO_PATH.2 --output-file=$PO_PATH @@ -176,7 +176,7 @@ extract_lang_src2pot () echo "" >>$MSGS_PATH cd $SRC_DIR - $ERL -pa $EXTRACT_DIR -pa $EBIN_DIR -pa $EJA_SRC_DIR -pa /lib/ejabberd/include -noinput -noshell -s extract_translations -s init stop -extra -srcmsg2po . $MSGS_PATH >$POT_PATH.1 + $ERL -pa $EXTRACT_DIR -pa $EBIN_DIR -pa $EJA_SRC_DIR -pa ../include -noinput -noshell -s extract_translations -s init stop -extra -srcmsg2po . $MSGS_PATH >$POT_PATH.1 sed -e 's/ \[\]$/ \"\"/g;' $POT_PATH.1 > $POT_PATH.2 #msguniq --sort-by-file $POT_PATH.2 $EJA_MSGS_DIR --output-file=$POT_PATH