|
From: jwray <jon...@fi...> - 2007-12-13 05:52:04
|
Hi, I'm currently working on improving Mac support. As part of that I submitted a patch recently that use Toolkit.getMenuShortcutKeyMask() to change shortcut definitions to their platform specific value. However, Peter pointed me in the direction of a more complete solution using the variant aspect of Locale. I have something working but I have a question that people with more experience with i18n may be able to help me with. Basically, what I'm experiencing is that if I want macos specific variants I need to specify both the language and the country files, eg, using English as an example, messages_en_GB_macosx.properties and messages_en_US_macosx.properties, which contain the same content. Is there a way to specify a macosx variant file for all English speaking countries, and not have to have a file for both GB and US? I've tried messages_en_macosx but that does not work. I can't find this mentioned anywhere on any i18n discussions and every combination I've tried so far does not work. thanks, Jonny -- View this message in context: http://www.nabble.com/i18n-Questions-tp14310171p14310171.html Sent from the springframework-rcp-dev mailing list archive at Nabble.com. |
|
From: Eduardo I. <zi...@su...> - 2007-12-13 13:17:13
|
I'm not sure if it is the best approach... I should not be forced do internationalize my application, just to make it work on the Mac. I think that i18n/platform are two orthogonal features. On 12/13/07, jwray <jon...@fi...> wrote: > > Hi, > > I'm currently working on improving Mac support. As part of that I submitted > a patch recently that use Toolkit.getMenuShortcutKeyMask() to change > shortcut definitions to their platform specific value. However, Peter > pointed me in the direction of a more complete solution using the variant > aspect of Locale. I have something working but I have a question that people > with more experience with i18n may be able to help me with. > > Basically, what I'm experiencing is that if I want macos specific variants I > need to specify both the language and the country files, eg, using English > as an example, messages_en_GB_macosx.properties and > messages_en_US_macosx.properties, which contain the same content. Is there a > way to specify a macosx variant file for all English speaking countries, and > not have to have a file for both GB and US? I've tried messages_en_macosx > but that does not work. > > I can't find this mentioned anywhere on any i18n discussions and every > combination I've tried so far does not work. > > thanks, > Jonny > > > -- > View this message in context: http://www.nabble.com/i18n-Questions-tp14310171p14310171.html > Sent from the springframework-rcp-dev mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > -- Eduardo Issao Ito Summa Technologies "Discipline is never an end in itself, only a means to an end" |
|
From: jwray <jon...@fi...> - 2007-12-13 17:43:24
|
Eduardo, The problem of the Mac using a different shortcut key and sometimes a different word for certain commands (eg Quit rather than Exit in English) is exactly analogous to different languages using different words for the same concept. Command labels and shortcut definitions are already specified in messages resources files so using the same mechanism as a way of dealing with labeling the commands differently on different platforms is a sound approach I believe. That's probably why Locale has the mechanism in place for dealing with such platform variants (thanks to Peter for pointing that out to me) Jonny Eduardo Issao Ito wrote: > > I'm not sure if it is the best approach... > I should not be forced do internationalize my application, just to > make it work on the Mac. > > I think that i18n/platform are two orthogonal features. > > > Eduardo Issao Ito > Summa Technologies > > "Discipline is never an end in itself, only a means to an end" > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > -- View this message in context: http://www.nabble.com/i18n-Questions-tp14310171p14320890.html Sent from the springframework-rcp-dev mailing list archive at Nabble.com. |
|
From: Xavier B. <xav...@ac...> - 2007-12-13 16:31:13
|
The way I know i18n works is that it looks first for the country specific properties file ex. messages_en_US, if it doesn't found the property it looks for it on the language specific bundle messages_en and then you can have as well a default bundle to be used if the property weren't found, this is a properties file without the language and the country, ex. messages.properties You can try puting the generic information in the default bundle file, then overide the specific with another bundle file for example for the language then for the country and then for the variant code you're using (macosx). Maybe the information in the java tutorial can help you with this issue. http://java.sun.com/docs/books/tutorial/i18n/index.html This is the page where you can find an example using variant code. http://java.sun.com/docs/books/tutorial/i18n/locale/create.html Xavier On Dec 13, 2007 7:05 AM, Eduardo Ito <zi...@su...> wrote: > I'm not sure if it is the best approach... > I should not be forced do internationalize my application, just to > make it work on the Mac. > > I think that i18n/platform are two orthogonal features. > > > > On 12/13/07, jwray <jon...@fi...> wrote: > > > > Hi, > > > > I'm currently working on improving Mac support. As part of that I submitted > > a patch recently that use Toolkit.getMenuShortcutKeyMask() to change > > shortcut definitions to their platform specific value. However, Peter > > pointed me in the direction of a more complete solution using the variant > > aspect of Locale. I have something working but I have a question that people > > with more experience with i18n may be able to help me with. > > > > Basically, what I'm experiencing is that if I want macos specific variants I > > need to specify both the language and the country files, eg, using English > > as an example, messages_en_GB_macosx.properties and > > messages_en_US_macosx.properties, which contain the same content. Is there a > > way to specify a macosx variant file for all English speaking countries, and > > not have to have a file for both GB and US? I've tried messages_en_macosx > > but that does not work. > > > > I can't find this mentioned anywhere on any i18n discussions and every > > combination I've tried so far does not work. > > > > thanks, > > Jonny > > > > > > -- > > View this message in context: http://www.nabble.com/i18n-Questions-tp14310171p14310171.html > > Sent from the springframework-rcp-dev mailing list archive at Nabble.com. > > > > > > ------------------------------------------------------------------------- > > SF.Net email is sponsored by: > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services > > for just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > _______________________________________________ > > Springframework-rcp-dev mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > > > > -- > Eduardo Issao Ito > Summa Technologies > > "Discipline is never an end in itself, only a means to an end" > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > |
|
From: jwray <jon...@fi...> - 2007-12-13 17:48:54
|
Xavier, Thanks for the reply. That's exactly what I'm doing, over-riding the mac specific properties in a file such as messages_en_US_macos.properties and it works fine. The problem is that I now need to specify such a file for every English speaking country to get the macos variants applied to it. What I'd like is to have a default English file with Mac variant but without specifying the country, eg messages_en_macosx.properties, that is then used for all English speaking countries. Every variation of file name without the country code I've tried has not worked. Jonny Xavier Breton wrote: > > The way I know i18n works is that it looks first for the country > specific properties file ex. > messages_en_US, if it doesn't found the property it looks for it on > the language specific bundle messages_en and then you can have as well > a default bundle to be used if the property weren't found, this is a > properties file without the language and the country, ex. > messages.properties > > You can try puting the generic information in the default bundle file, > then overide the specific with another bundle file for example for the > language then for the country and then for the variant code you're > using (macosx). > > Maybe the information in the java tutorial can help you with this issue. > http://java.sun.com/docs/books/tutorial/i18n/index.html > This is the page where you can find an example using variant code. > http://java.sun.com/docs/books/tutorial/i18n/locale/create.html > > Xavier > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Springframework-rcp-dev mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-rcp-dev > > -- View this message in context: http://www.nabble.com/i18n-Questions-tp14310171p14320923.html Sent from the springframework-rcp-dev mailing list archive at Nabble.com. |