Localise Config Strings #4009
flatcap
started this conversation in
Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This will allow the translators to provide language-specific defaults for common config strings.
The initial list is:
$attribution_intro
--"On %d, %n wrote:"
$compose_format
--"-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-"
$forward_attribution_intro
--"----- Forwarded message from %f -----"
$forward_attribution_trailer
--"----- End forwarded message -----"
$reply_regex
--"^((re|aw|sv)(\\[[0-9]+\\])*:[ \t]*)*"
$status_format
--"-%r-NeoMutt: %D [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%?T?%T/?%s/%S)-%>-(%P)---"
$ts_icon_format
--"M%?n?AIL&ail?"
$ts_status_format
--"NeoMutt with %?m?%m messages&no messages?%?n? [%n NEW]?"
Tasks
DT_L10N_STRING
afterDT_PATH_FILE
mutt_config.c
and otherstranslate_config()
Call it from
mutt_init()
, after the suspend code ~L670translate_config()
needs toDT_L10N_STRING
flagThere's code to get all the config and loop through it in
cs_subset_free()
.HashElem->type
contains the config item's type and flags.HashElem->data
points to astruct ConfigDef
with everything else.The translation can be done with a call to
gettext()
Saving the result can be done with
cs_str_initial_set()
andcs_str_reset()
(there are examples in
mutt_init()
.Beta Was this translation helpful? Give feedback.
All reactions