diff options
author | Badlop <badlop@process-one.net> | 2020-05-04 16:16:51 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2020-05-04 16:25:42 +0200 |
commit | e6a3b1fa683424dc55e78bb12938067767411091 (patch) | |
tree | 861b587e4bc0008c8879905a88be935d58b17e11 | |
parent | Fix the new service_subscription_subscribers test (#2696) (diff) |
Extract translatable strings also from the xmpp library
-rwxr-xr-x | tools/extract-tr.sh | 7 | ||||
-rwxr-xr-x | tools/prepare-tr.sh | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tools/extract-tr.sh b/tools/extract-tr.sh index 851f86956..99a391427 100755 --- a/tools/extract-tr.sh +++ b/tools/extract-tr.sh @@ -4,8 +4,7 @@ main(Paths) -> Dict = fold_erls( fun(File, Tokens, Acc) -> - File1 = filename:rootname(filename:basename(File)), - extract_tr(File1, Tokens, Acc) + extract_tr(File, Tokens, Acc) end, dict:new(), Paths), generate_pot(Dict). @@ -114,7 +113,7 @@ format_location_list(L) -> "#: " ++ string:join( lists:map( fun({File, Pos}) -> - io_lib:format("~s.erl:~B", [File, Pos]) + io_lib:format("~s:~B", [File, Pos]) end, L), " ") ++ io_lib:nl(). @@ -137,7 +136,7 @@ pot_header() -> "\"MIME-Version: 1.0\\n\"", "\"Content-Type: text/plain; charset=UTF-8\\n\"", "\"Content-Transfer-Encoding: 8bit\\n\"", - "\"X-Poedit-Basepath: ../../src\\n\"", + "\"X-Poedit-Basepath: ../..\\n\"", "\"X-Poedit-SearchPath-0: .\\n\""], io_lib:nl()). diff --git a/tools/prepare-tr.sh b/tools/prepare-tr.sh index cca56fcf6..517b675bb 100755 --- a/tools/prepare-tr.sh +++ b/tools/prepare-tr.sh @@ -10,7 +10,7 @@ extract_lang_src2pot () { - ./tools/extract-tr.sh src > priv/msgs/ejabberd.pot + ./tools/extract-tr.sh src deps/xmpp/src > priv/msgs/ejabberd.pot } extract_lang_popot2po () |