String Formatting
Closed this issue · 3 comments
maennchen commented
Support restructuring of message strings.
Right now, the only option is to preserve the line splitting:
.po
(read & write) should produce an identical file.mo
does not contain line information, everything is one single string
TODO
- Introduce
rebalance_strings
function on translation struct - Introduce
rebalance_strings
function on all translations (including headers)
Behaviour of rebalance_strings
- Fields
msgid
msgid_plural
msgstr
headers
- Split at newlines and put every line in its own string
- Split words at maxlength?
maennchen commented
@kipcole9 Does this cover what you imagined?
Should we impose a max length (only splitting space between words) or should we only split on newlines?
kipcole9 commented
I think splitting at newlines would be more human readable. Overall this is looking really good! And it goes a long way to towards the original intent of separating serialisation of messages so that other serialization backend could be possible.