25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Don't extract for translation strings from man pages, at least for now

This commit is contained in:
Badlop 2020-04-17 19:15:18 +02:00
parent 1b98084918
commit 99d21bca49

View File

@ -17,11 +17,23 @@ extract_tr(File, [{'?', _}, {var, _, 'T'}, {'(', Line}|Tokens], Acc) ->
{String, Tokens1} ->
extract_tr(File, Tokens1, dict:append(String, {File, Line}, Acc))
end;
extract_tr(_File, [{atom,_,module}, {'(',_}, {atom,_,ejabberd_doc} | _Tokens], Acc) ->
Acc;
extract_tr(File, [{atom, _, F}, {'(',_} | Tokens], Acc)
when (F == mod_doc); (F == doc) ->
Tokens2 = consume_tokens_until_dot(Tokens),
extract_tr(File, Tokens2, Acc);
extract_tr(File, [_|Tokens], Acc) ->
%%err("~p~n", [A]),
extract_tr(File, Tokens, Acc);
extract_tr(_, [], Acc) ->
Acc.
consume_tokens_until_dot([{dot, _} | Tokens]) ->
Tokens;
consume_tokens_until_dot([_ | Tokens]) ->
consume_tokens_until_dot(Tokens).
extract_string([{string, _, S}|Tokens], Acc) ->
extract_string(Tokens, [S|Acc]);
extract_string([{')', _}|Tokens], Acc) ->