I'm working on adding a feature where some fields of an automatically-generated certificate request can be provided by the user rather than coming directly from the database. In my current implementation, rules that ask for user-specified data are just data rules with the "prompt" option set to a string; this string is displayed to the user to request the data. For example: https://github.com/LiptonB/freeipa/blob/local-user-data/install/share/csr/rules/dataEmailUserSpecified.json

I was thinking about internationalization for these prompt strings. We don't need to worry about translating strings in rules that admins define themselves, but if we want to ship any examples of this type of rule with IPA, I was thinking that the prompts might need to be translated.

I can wrap the prompt string in _() when the JSON blob is read in, but as the strings are defined in JSON files they still won't be automatically incorporated into the po and pot files, so this won't really do anything. Can you think of a clean way to include these strings when translation files are updated?

To see the full implementation, take a look at:


Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to