← Back to team overview

ubuntu-phone team mailing list archive

Re: [Scopes] Easy (?) questions

 

On Thu, Nov 20, 2014 at 12:31 AM, Robert Schroll <rschroll@xxxxxxxxx> wrote:
2) Is there a way to mark strings in the settings.ini file as translatable, and then to put those strings in the installed settings.ini file?

For the record, I ended up stealing the mechanism of from the YouTube scope. Other than deleting the PO files from my source directory when running 'make clean' in build directory (what?), it seems to work pretty well. You can see the commit here: https://github.com/rschroll/gmail-scope/commit/22308ebdfcc53603dee1f12db4ffd5e769373db6

Two gotchas if you based your work on the default projects:

1) It uses FindIntltool.cmake rather than FindXGettext.cmake and UseXGettext.cmake. This is obviously better for translating the INI files, and I haven't found anyway in which it is noticeably inferior. Why not make this the default, instead of forcing people to switch once they realize they need to translate their settings file?

2) You can't have spaces around the equal signs in translatable entries your INI files. (Because ' ?= ?' is too complicated a regex for intltool?) The default projects and all the examples use spaces. To save other people the hour I wasted tracking that down, we should remove those spaces.

Robert



Follow ups

References