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

List:       kde-core-devel
Subject:    Re: XML and internationalization question
From:       Stephan Kulow <coolo () kde ! org>
Date:       2000-03-31 13:25:37
[Download RAW message or body]

Simon Hausmann wrote:
> 
> On Fri, 31 Mar 2000, Stephan Kulow wrote:
> 
> > Simon Hausmann wrote:
> > >
> > > On Thu, 30 Mar 2000, Emily Ezust wrote:
> > >
> > > > David Faure wrote:
> > > > > On Thu, Mar 30, 2000 at 02:07:18AM +0100, Rik Hemsley wrote:
> > > > > > #if David Faure
> > > > > > > This is a very strange comment. Why define a completely new action,
> > > > > > > if you _just_ want to change the text ? At least all the rest
> > > > > > > (icon, accel, name...) is consistent. If you define a new one,
> > > > > > > it will be even more inconsistent. Changing a text can happen
> > > > > > > if in this particular application, the standard action needs
> > > > > > > a slightly different label. Still, the icon, accel, etc. are still
> > > > > > > valid.
> > > >
> > > > Here's another example defending the need for flexibility:
> > > >
> > > > The icons in ark for non-standard actions like Add File, Add Directory,
> > > > Extract and Delete all use pictures of safes for indicating the action.
> > > > If I use the standard icons for Open and New, the iconography is
> > > > all wrong. So for those KStdActions I use icons with safes rather
> > > > than icons with the folder/paper motif.
> > >
> > > I'm not 100% sure if I got the problem, so please ignore this mail if I'm
> > > totally off the wall.
> > >
> > > If you want to change properties of KStdActions (or any other actions in
> > > your app), then why don't you use either the Qt property system or the
> > > property method of the action directly, instead of using the
> > > ActionProperties element in the xml document?
> > >
> > > While the ActionProperties stuff works for properties like icon it is not
> > > suitable for text which is mean to be translated ed (as these attributes
> > > cannot be translated in the xml document (unlike the <text> elements
> > > for container captions/names, as they go through an i18n() call) ) .
> > >
> > > KAction *bar = KStdAction::foo( ... );
> > > // ok, I want a different icon and a different description
> > > bar->setIcon( "blah" );
> > > bar->setText( i18n( "ThisDescriptionFitsBetter" ) );
> > >
> > > Or am I missing something?
> > >
> > The question was more how to translate the stuff that comes from the XML
> > file,
> > not just StdActions.
> 
> Well, for the <text>blah</text> elements we have a solution (thanks to
> your script/work :)
> 
> And for the action properties section it does not make sense IMHO to
> attempt to translate it. IMHO the right thing is to call
> action->setText() (IMHO the actionproperties stuff is for tools like the
> toolbareditor)
> 
> But well, of course we can (easily) change the format of the
> ActionProperties stuff from
> 
> <Action name="foo" icon="myIcon" accel="CTRL+F" />
> 
> to
> 
> <Action name="foo">
>  <icon>MyIcon</icon>
>  <accel>CTRL+F</accel>
>  <text>BetterUseSetText</text>
>  <text lang="de">DasIstSchlechtUebersetzt</text.
> </Action>
> 
> Shall we do that?
> 
No! It will end in a mess

Greetings, Stephan

-- 
It said Windows 95 or better, so in theory Linux should run it
                                                GeorgeH on /.

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

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