Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding place holder texts from localisations

When I design a cell layout I usually assign a sample text, e.g. 'John Appleseed' to a 'name' label so I can easily see where the field is on the layout and check the composition. Otherwise there is an empty label on a white background. Obviously this text does not need to be translated as it will be always replaced by another value at runtime.

Is there any property I can set in the Object Inspector to exclude this text from .strings / XLIFF file? Translators usually charge per word, so I don't want to send those texts for translation.

For the time being I use '~' prefix and then remove those texts using a Ruby script, but I was wondering whether there is an easier way to do it.

like image 794
tomi44g Avatar asked Jul 02 '14 16:07

tomi44g


1 Answers

Unfortunately, if you are using ibtool (and you do not really have an alternative) you cannot exclude words directly.

What you can do, is to edit the XLIFF file after you export it and add the attribute translate="no" on the strings you want to exclude. You should make sure that your translators use a XLIFF-compatible tool to translate.

But, imho, this is not any better than your way.

Also see question 1, question 2 and ibtool's manual.

like image 60
Daniel Avatar answered Nov 03 '22 11:11

Daniel