]> granicus.if.org Git - ejabberd/commitdiff
* contrib/extract_translations/extract_translations.erl: Don't
authorBadlop <badlop@process-one.net>
Tue, 4 Dec 2007 23:41:52 +0000 (23:41 +0000)
committerBadlop <badlop@process-one.net>
Tue, 4 Dec 2007 23:41:52 +0000 (23:41 +0000)
report [] to be translated. Identify unusued strings.

SVN Revision: 1022

ChangeLog
contrib/extract_translations/extract_translations.erl

index d2adc6352508115cea71ab74b2bfb31426918a2e..b8c73a595538863ce1c568b5cf4ded2dae75964d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-05  Badlop  <badlop@process-one.net>
+
+       * contrib/extract_translations/extract_translations.erl: Don't
+       report [] to be translated. Identify unusued strings.
+
 2007-12-04  Badlop  <badlop@process-one.net>
 
        * .gitignore: Removed (EJAB-441)
index 01788c504149d5d461c271b4227cab94e4faaab0..bd116b090c4eb93b98a430cd83c308cdf114112a 100644 (file)
@@ -49,7 +49,7 @@ process(Dir, File, Used) ->
            case Used of
                unused ->
                    ets:foldl(fun({Key, _}, _) ->
-                                   io:format("~p~n", [Key])
+                                     io:format("Unused string: ~p~n", [Key])
                              end, ok, translations); 
                _ ->
                    ok
@@ -122,7 +122,10 @@ process_string(_Dir, File, Str, Used) ->
                    io:format("~n% ~s~n", [File]),
                    ets:insert(files, {File})
            end,
-           io:format("{~p, \"\"}.~n", [Str]),
+           case Str of
+               [] -> ok;
+               _ -> io:format("{~p, \"\"}.~n", [Str])
+           end,
            ets:insert(translations, {Str, ""});
        _ ->
            ok