The conflict message "local %s %s, incoming %s %s upon %s" in svn_cl__get_human_readable_tree_conflict_description is not correctly prepared for localisation. First, two of the parameters are inserted untranslated (in English), making proper translation impossible; second, piecing together a string from individual words does not work in general for many translations, because of varying word order and concord.

The standard solution is to provide whole strings for each case, but the number of combinations is probably just too big for that: 2*9*2*4*3 = 432, if all are possible (probably untrue). As a compromise to keep it manageable, this patch only translates each sub- phrase separately, resulting in 2*9 + 2*4 + 3 = 29 short strings.

The patch assumes that svn_node_none, svn_node_unknown or svn_wc_operation_none cannot occur here. Please confirm or refute.

The produced (English) strings are not changed, although doing so should perhaps be considered since these particular messages seem to be particularly difficult to understand.

Implementation-wise, I preferred using switch statements to mucking about with tables, since it made the code simpler and statically safer (thanks to gcc's exhaustiveness check when switching on enums).

[[[
Make the conflict message "local %s %s, incoming %s %s upon %s"
translatable by constructing it from longer parts, each translated,
instead of single words (some of which were not translated at all).

* subversion/svn/cl-conflicts.c
(svn_cl__get_human_readable_tree_conflict_description): Build string out
   of translated sub-phrases rather than from single words.
  (local_reason_str, incoming_action_str, operation_str): New.
  (map_conflict_action_human, map_conflict_reason_human,
   action_str, reason_str): Removed.
]]]

Attachment: cl-conflicts.patch
Description: Binary data


Reply via email to