Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - How do you write [cmd] in *your* language?
How do you write [cmd] in *your* language?
 
   NeoOffice Forum Index -> NeoOffice Development
View previous topic :: View next topic  
Author Message
yoxi
Cipher


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Thu May 04, 2006 1:37 pm    Post subject: How do you write [cmd] in *your* language?

I'm editing the language resources in the macro DicOOo.sxw, which is the basis for the dictionary installer wizard. It currently tells the user to hold down [ctrl] while clicking if they want to select more than one language for dictionary, hyphens, or thesaurus - but in OSX this should be [cmd].

I need to know how people write cmd (as in short for the command key or apple key) in their language, so that I can corretly replace all the references to ctrl (or their equivalent in the different languages).

Does anyone know of a web resource for translations of key stuff like this for mac users, or failing that, just tell me how you'd write it in your own language and I'll keep a list.

Thanks...

- Padmavyuha


Last edited by yoxi on Thu May 04, 2006 1:59 pm; edited 1 time in total
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Thu May 04, 2006 1:43 pm    Post subject:

Do you know if there are any characters for the cloverleafish command icon thingy? If so, I'd say to use that as it'd be roughly language independent Smile

ed
Back to top
yoxi
Cipher


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Thu May 04, 2006 3:04 pm    Post subject:

Hah - I was trying to be too clever - being a budding webmaster, I was unconsciously thinking 'this has got to work cross-platform, so I can't just insert the symbol', when of course it only has to work on a mac!

So I've edited the macro, all references in all the languages it supports are changed from [ctrl] to [?] (if that comes out on your browser as the cloverleaf), and it's available in bugzilla #1439 if you folks want to include it in a future patch of the app.

I think this will make new users' lives easier. And Patrick, I'm happy to re-do this if/when the macro itself ever gets updated. It's a very trivial change to the language block text segments, and doesn't dick around with the actual code at all - this should not make any extra work for you... Smile

- padmavyuha
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu May 04, 2006 3:16 pm    Post subject:

yoxi wrote:
So I've edited the macro, all references in all the languages it supports are changed from [ctrl] to [?] (if that comes out on your browser as the cloverleaf), and it's available in bugzilla #1439 if you folks want to include it in a future patch of the app.


Please see my comments in that bug. If you were just editing a document, I'd have no problem. But you are editing code and when I diff'd the internals of your changed file to the original work, nearly every line of code is marked as changed. That is risky considering that neither you nor I are experts in this code and this code is the only way to get dictionaries in Neo 2.0.

I really think that you should ask the author of DicOOo.sxw to make these changes as he does understand his code and he pushes any of his changes through OOo's testing. If a new file comes from him, I'll feel much less worried about this.

Patrick
Back to top
iking
Operator


Joined: Apr 26, 2006
Posts: 49
Location: Vancouver, BC

PostPosted: Thu May 04, 2006 3:23 pm    Post subject:

Quote:
Do you know if there are any characters for the cloverleafish command icon thingy?


The cloverleaf thingy has its own Unicode entry at U+2318 (just use "insert special character" when replacing). I did replace some instances of "Ctrl" with the cloverleaf character in DicOOO's translation resources and it seems to display properly when I run the macro, though I haven't tested all languages.
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Thu May 04, 2006 3:24 pm    Post subject:

OPENSTEP wrote:
Do you know if there are any characters for the cloverleafish command icon thingy? If so, I'd say to use that as it'd be roughly language independent Smile

⌘ U+2318, but it will probably be missing from most PC fonts Sad I don't even think it's in Bitstream Vera. That makes it no good for the cross-platform nature of DicOOo Sad

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
yoxi
Cipher


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Thu May 04, 2006 10:28 pm    Post subject:

The thing is, NeoOffice (and not OOo X11) is the only OOo platform that needs the macro to say [cmd] rather than [ctrl]. Laurent Godard, the author of DicOOo.sxw has not written the code with the flexibility to change this entry in each language only if it's invoked by a NeoOffice user (and why would he? I think his original macro predates NeoOffice!).

This is why I did this NeoOffice-hack version. In Laurent's code, there are 2 modules called Translation & Translation2 which contain between them the text strings for the 25-odd languages his macro supports (equivalent of localizable.strings rather than part of the actual executable code). Each language section has a line which is the equivalent of the English:
Code:
traduction(Langue,17)="You can select more than one language by pressing and holding down  the [Ctrl] key ..."

All I did in each instance was change [Ctrl] (or its non-English equivalent) to [cloverleaf symbol] in those lines. I did in 3 cases add a word too - for some reason in Italian/Spanish/Catalan this line just read the equivalent of 'you can click to add more than one language' so I added the equivalent of 'with [cloverleaf]'.

It would not be trivial to change the code such that it detected itself being run from NeoOffice and inserted cloverleaf instead of Ctrl in each case. For one thing it would need a lookup array added, as different languages uses a different word for Ctrl, so it's not just a case of 'insert this if Neo, otherwise insert that'; but mostly because I'm not sure how you'd detect Neo in the first place. Anyway, what I'm saying here is that it's very unlikely we'd get a new version from the author that played nicely with NeoOffice specifically, but we don't really need one as I'm happy to re-edit any new versions of DicOOo.sxw that come along.

Patrick, I suspect that the reason why all the code shows up as edited (if it isn't just because I added 3 lines of comments to each of the 2 modules) could be that DicOOo.sxw is an OOo v1 document, and I saved it in Neo v2. I didn't touch any lines of code apart from the specific language text strings in those 2 modules, equivalent to editing minor typos in a localizable.strings file. Given the global significance of this macro for the installation, though, I understand your caution, and your reluctance to implement 'hacked' content... I enjoyed this exercise in any case, and if I do manage to get Laurent to implement the more major 'detect Neo and add cloverleaf instead' code (or somehow figure it out myself and get him to accept my changes Smile) I'll let you know.

- Padmavyuha
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri May 05, 2006 2:26 am    Post subject:

yoxi wrote:
The thing is, NeoOffice (and not OOo X11) is the only OOo platform that needs the macro to say [cmd] rather than [ctrl].

Surely that's a bug in OOo/X11 Razz But they never have been able to get that right since taking over from Ed....

In theory there's some variable that could detect the platform (cf the generator string in a web document), but right now we're "Unix", so that wouldn't help anyway....

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
yoxi
Cipher


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Fri May 05, 2006 2:53 am    Post subject:

sardisson wrote:
In theory there's some variable that could detect the platform (cf the generator string in a web document), but right now we're "Unix", so that wouldn't help anyway....

Vout - in any case it'd have to be one that distinguishes between X11 and OSX-native OOo, since on the mac it could be either (until OOoCoCo supersedes X11), sigh...

- padmavyuha
Back to top
static
Agent


Joined: May 02, 2006
Posts: 10
Location: Montreal/Ottawa, Canada

PostPosted: Fri May 05, 2006 12:21 pm    Post subject:

I had never heard it called the "command" key before recently - my friend would always tell me "hit apple-Q!" You could potentially use the word for apple!

Example in French: Pomme-Q

Just an idea...

_________________
MacBook Pro 2GHz, 2GB RAM > OS X Tiger
AMD FX-51, 1 GB RAM > Kubuntu Linux
Back to top
yoxi
Cipher


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Fri May 05, 2006 2:26 pm    Post subject:

The reason I think the cloverleaf symbol makes more sense than 'apple' (or even the apple symbol) is that every mac keyboard has one, whereas many 3rd party mac keyboards (such as the one I'm now typing on) have the cloverleaf but no apple. And using the symbol is better than 'cmd' because it's international, so no need to worry about what 'command' is in different languages.
I've written to Laurent (en français imparfait) about the possibility of incorporating an OSX-native check into his macro code and adapting the modifier accordingly - we'll see what he says, if he can make sense of my french (what *is* french for 'modifier key', anyway? 'clé-modificatrice' sounds way too wordy for tech-french Smile) For politics' sake I've pushed the 'if/when Eric et al get their OSX-native version out, there'll be even more OOo mac-users who need this' angle Cool

- Padmavyuha
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri May 05, 2006 3:00 pm    Post subject:

yoxi,

You might want to pass on the word that the way to detect that this is a Mac native version of OOo (either Neo or some future OOo Aqua port) is too look at the following OOo registry entry:

/org.openoffice.Office.Common/Help

In that entry, there is a property called "System" and if it is equal to "MAC", then a cloverleaf should be displayed. Any other value should use the existing text. This is the property that OOo's help system uses to toggle on "Command" instead of "Control".

BTW, until the next Neo patch, the "System" property is "UNIX". In OOo 1.1.x, this property was in a different file so my installer scripts for Neo 2.0 didn't update it and in the Neo help, you'll see many "Control" instead of "Command" references.

Patrick
Back to top
yoxi
Cipher


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Fri May 05, 2006 10:21 pm    Post subject:

Thanks for the tip, Patrick - this is doing me a lot of good, for one thing I'm definitely having to polish up my tech-french!

- Padmavyuha
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Development All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.