[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Question about writing dummy i18ns in a manner in which scripty picks them up
From:       Wolfgang Rohdewald <wolfgang () rohdewald ! de>
Date:       2012-09-03 8:37:47
Message-ID: 37423961.YVaJiFc5N5 () i5
[Download RAW message or body]

Am Montag, 3. September 2012, 01:24:50 schrieb Akarsh Simha:
> So let's say I have an array of strings:
> 
> QString foo[] = { "String1", "String2", "String3", ... };
> 
> Somewhere, I want to call i18nc( "context", foo[ index ] )
> 
> But xgettext doesn't know that it should extract String*.
> 
> What's the best way to solve this problem? Does xgettext read inside
> comments, where I can put dummy i18n calls?

two more solutions:

- define a dummy function translatethis(msg) which simply returns msg
- change Messages.sh such that is parses translatethis too. This can be
done with xgettext -k. For an example, see kdegames/kajongg/Messages.sh

or use I18N_NOOP:
http://techbase.kde.org/Development/FAQs/Technical_FAQ#What_is_the_difference_between_i18n_and_I18N_NOOP.3F


-- 
Wolfgang


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic