Skip to content

Commit

Permalink
Do not output deprecated translations to json
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Grondin committed Apr 6, 2020
1 parent 10d7114 commit 70922ac
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/cli/strings.ml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ let write_other ~language english other =
Some (`Both, Lwt_io.write oc_strings line_strings <&> Lwt_io.write oc_json line_json)
| `Right y when String.(key = y) -> None
| `Right y ->
let fmt_key = fmt key in
let fmt_y = fmt y in
let line_strings = sprintf "/* Not currently used */\n%s = %s;\n\n" fmt_key fmt_y in
let line_json = json_pair fmt_key fmt_y first in
Some (`Right, Lwt_io.write oc_strings line_strings <&> Lwt_io.write oc_json line_json)
(* No need to write "deprecated translations" to JSON *)
let line_strings = sprintf "/* Not currently used */\n%s = %s;\n\n" (fmt key) (fmt y) in
Some (`Right, Lwt_io.write oc_strings line_strings)
)
in
let%lwt stats = String.Table.fold table ~init:(Lwt.return (0, 0, 0)) ~f:(fun ~key:_ ~data:(w, p) acc ->
Expand Down

0 comments on commit 70922ac

Please sign in to comment.