Posted: 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
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...
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.
Joined: Apr 26, 2006 Posts: 49 Location: Vancouver, BC
Posted: 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.
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
⌘ U+2318, but it will probably be missing from most PC fonts I don't even think it's in Bitstream Vera. That makes it no good for the cross-platform nature of DicOOo _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
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 ) I'll let you know.
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 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
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...
Joined: May 02, 2006 Posts: 10 Location: Montreal/Ottawa, Canada
Posted: 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
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.
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