Closed fonskip closed 1 month ago
I will add all the necessary changes in the pull request for my other issue, #95
Hello, I have added gettext to this string and regenerated the potfile
Hello. there are other interesting things to note about the translation :
gettext(format!())
should be replaced by gettext!()
distrobox-list
should be translated (as it is shown in the UI) ?gettext(format!()) should be replaced by gettext!()
Does that make a difference to the output, or is it just shorter to type?
do you think that the status printed by distrobox-list should be translated (as it is shown in the UI) ?
No, that's up to Distrobox itself to translate its own output
gettext(format!()) should be replaced by gettext!()
Does that make a difference to the output, or is it just shorter to type?
Yes, it makes a difference: gettext did not detect strings inside of format! macros. Also, it allows translators to position the {}
at the right place, so it should be preferred over alternatives. For example, it is better to translate "How is {}?" with gettext!("How is {}?", john)
rather than just translating "How is" with gettext("How is")
, because in most latin languages, the question mark should have a space before: "Comment va {} ?". The first solution allows this change, while the second one does not.
https://github.com/Dvlv/BoxBuddyRS/blob/39212c2d61b3177b9388874bd98e4b104bc933ad/src/main.rs#L866 This text is not translated.
I’m not sure about the correct method to add translation "fields" in the pot file so won’t submit a change for this. But I have submitted a french translation and will update it as soon as the new field is there.