Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a check for translatable format strings in glade.
This one might be a little confusing. Having translatable strings in glade works fine for the most part, but having translatable strings that contain format substitution information in glade is problematic. The format substitution is by necessity outside of glade, which causes two related problems. First, separating the string constant from the format operation looks confusing and needs information from another file to know the order or names of the arguments: # I have no idea what is going on label.set_text(label.get_text() % ("huh", "ok")) and second, the translations of the format strings can't be checked. Normally if a translator messes up one of our format strings, msgfmt will raise an error during the build. The strings in glade files, however, are supposed to be language-independent, so they don't get the c-format or python-format attributes that the strings in C and Python source files do, and the error happens at runtime. Format strings without the translatable attribute are fine, since they're handy to use as placeholders.
- Loading branch information