Re: [josm-dev] Localisation policy for quotes etc.

2010-01-18 Thread Matthias Julius
Dirk Stöcker openstreet...@dstoecker.de writes:

 On Wed, 13 Jan 2010, Matthias Julius wrote:

 I would like to delay all these issues until Launchpad has a proper fuzzy
 string handling (except these were texts are auto-fixed).

 Are those .po files downloadable somewhere?  I can do the unfuzzying myself.

 The current state is always in OSM-SVN directory i18n. The
 ./launchpad.pl when called without URL updates all files and creates
 an upload-file for launchpad. When you change stuff, then you need
 first modify the po's and josm.pot and do update afterwards. When the
 strings are still there without fuzzy, then you did everything
 right.

I have just checked in updated .po files as of JOSM r2875 into
svn.osm.org

Could you upload those to Launchpad?  On a quick look I could not
figure out where to upload the upload file to.

Matthias

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Frederik Ramm
Hi,

Andre Hinrichs wrote:
 I thought, these don'ts and won'ts is proper english. Am I wrong?

In formal written English you use do not, will not, and cannot.

 I've found another british-american issue with the word authorise.
 Since texts (and maybe also methods and variables) should be in american
 english authorise should be changed to authorize.

Hadn't we agreed on British English? It is what is commonly used in OSM 
(hence highway=motorway not highway=freeway, amenity=cinema not 
amenity=movie_theater, etc.)

Bye
Frederik

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Dirk Stöcker
On Wed, 13 Jan 2010, Frederik Ramm wrote:

 Hadn't we agreed on British English? It is what is commonly used in OSM
 (hence highway=motorway not highway=freeway, amenity=cinema not
 amenity=movie_theater, etc.)

JOSM internal is by fact en_US for a long time now (at least as long as 
I work for JOSM). I don't know were British English is standard, but at 
least for JOSM it is not. I also would not change that, as en_US is also 
standard for most other software (if one does like it or not :-)

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)


___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Sebastian Klein
 Already announced for some time: 20.04.2010.

Typo: I think you mean 20.01.2010

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Marc Schütz
  Also, I want to change all those don'ts and won'ts to proper English.
  This doesn't change the meaning of the string, so all the translations
  (hopefully) just need to be unfuzzied.
 
 I thought, these don'ts and won'ts is proper english. Am I wrong?

+1

Furthermore, don't and do not etc. are not freely interchangeable, as they 
have different connotations and for both there are situations where they are 
not appropriate.

Regards, Marc

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Matthias Julius
Dirk Stöcker openstreet...@dstoecker.de writes:

 On Wed, 13 Jan 2010, Matthias Julius wrote:

 Since I currently check all translatable texts I found that sometimes
 quotes are single and sometimes double. E.g. isn't is sometimes simply
 isn't and sometimes isn''t.

 Which is the correct way?

 The correct way will be to escape single quotes with another one (''),
 always.

 In the near future all translations will be fed through
 MessageFormat.format(), so they all get the same treatment.

 Also, I want to change all those don'ts and won'ts to proper English.
 This doesn't change the meaning of the string, so all the translations
 (hopefully) just need to be unfuzzied.

 There are a couple of other minor issues I came across that will get
 fixed on the way.

 I would like to delay all these issues until Launchpad has a proper fuzzy 
 string handling (except these were texts are auto-fixed).

Are those .po files downloadable somewhere?  I can do the unfuzzying myself.

Matthias

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Dirk Stöcker

On Wed, 13 Jan 2010, Matthias Julius wrote:


I would like to delay all these issues until Launchpad has a proper fuzzy
string handling (except these were texts are auto-fixed).


Are those .po files downloadable somewhere?  I can do the unfuzzying myself.


The current state is always in OSM-SVN directory i18n. The ./launchpad.pl 
when called without URL updates all files and creates an upload-file for 
launchpad. When you change stuff, then you need first modify the po's and 
josm.pot and do update afterwards. When the strings are still there 
without fuzzy, then you did everything right.


I attached a script I used last time. I think I passed unchanged/changed 
strings pairs to it, but it was some time ago, I don't remember :-)


Ciao
--
http://www.dstoecker.eu/ (PGP key available)

translationupdate.pl
Description: Perl program
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Matthias Julius
Dirk Stöcker openstreet...@dstoecker.de writes:

 On Wed, 13 Jan 2010, Matthias Julius wrote:

 I would like to delay all these issues until Launchpad has a proper fuzzy
 string handling (except these were texts are auto-fixed).

 Are those .po files downloadable somewhere?  I can do the unfuzzying myself.

 The current state is always in OSM-SVN directory i18n. The
 ./launchpad.pl when called without URL updates all files and creates
 an upload-file for launchpad. When you change stuff, then you need
 first modify the po's and josm.pot and do update afterwards. When the
 strings are still there without fuzzy, then you did everything
 right.

 I attached a script I used last time. I think I passed
 unchanged/changed strings pairs to it, but it was some time ago, I
 don't remember :-)

OK, I will try that.

BTW, I came across a number of strings where single quotes were not
escaped.  So I think this overhaul is a good thing.

Matthias

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Matthias Julius
Marc Schütz schue...@gmx.net writes:

  Also, I want to change all those don'ts and won'ts to proper
  English.  This doesn't change the meaning of the string, so all
  the translations (hopefully) just need to be unfuzzied.
  I thought, these don'ts and won'ts is proper english. Am I wrong?

 +1

 Furthermore, don't and do not etc. are not freely interchangeable,
 as they have different connotations and for both there are situations
 where they are not appropriate.

Well, this is true - especially for spoken language.  This has
probably much to do with the emphasis that is also put on it.  There
is certainly a difference between I won't do that. and  I WILL NOT
do that.

But, in written language these shortcuts are consided casual and they
are not used in formal texts, AFAIK.  That's why I use this in emails,
but not in the user interface of a program.

Do we have any native English speakers here?  It is somewhat silly to
discuss subtle meanings of the English language between Germans.

Matthias

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Mike N.
 But, in written language these shortcuts are consided casual and they
 are not used in formal texts, AFAIK.  That's why I use this in emails,
 but not in the user interface of a program.

 Do we have any native English speakers here?

  To place it in context, program messages that use poor grammar stick 
in my mind and reflect poorly on the program, but I would not give program 
messages that use contractions a second thought.   While program messages 
should be a bit more formal than email, I have never considered that program 
message formality level should match a formal business paper letter.  (I may 
be wrong.  Disclaimer: I'm not a top grammar student).

 


___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Ævar Arnfjörð Bjarmason
On Wed, Jan 13, 2010 at 14:53, Matthias Julius li...@julius-net.net wrote:
 Marc Schütz schue...@gmx.net writes:

  Also, I want to change all those don'ts and won'ts to proper
  English.  This doesn't change the meaning of the string, so all
  the translations (hopefully) just need to be unfuzzied.
  I thought, these don'ts and won'ts is proper english. Am I wrong?

 +1

 Furthermore, don't and do not etc. are not freely interchangeable,
 as they have different connotations and for both there are situations
 where they are not appropriate.

 Well, this is true - especially for spoken language.  This has
 probably much to do with the emphasis that is also put on it.  There
 is certainly a difference between I won't do that. and  I WILL NOT
 do that.

 But, in written language these shortcuts are consided casual and they
 are not used in formal texts, AFAIK.  That's why I use this in emails,
 but not in the user interface of a program.

 Do we have any native English speakers here?  It is somewhat silly to
 discuss subtle meanings of the English language between Germans.

Perhaps you can make do with me? :)

Well Marc Schütz is in theory completely wrong that don't and do not
are not freely interchangeable. Don't is a contraction of do not
and means exactly the same thing by definition.

However as you point out the meanings are in practice subtly
different. Contraction-free speech has an air of authority about it
Do not touch that, it is hot as opposed to Don't touch that, it's
hot.

Contraction are accepted almost everywhere in English, although you
might get into trouble if you use them in something like a scholarly
paper, they're not looked down upon like reductions are, such as want
a - wanna.

All of these contractions and reductions will no doubt become
perfectly accepted English within a few decades, just try reading
newspaper articles en English from the early 20th century where
authors avoid writing things that are universally acceptable today,
such as writing automobile without a hyphen (just as we're slowly
converting E-Mail into email nowadays).

But to comment on the general issue here interface messages should in
my opinion by clear, short and unambiguous, JOSM has sometimes lacked
in this respect mostly due to being written by people for whom English
is a second language.

I don't think programs should take themselves overly serious though,
Potlatch doesn't, nor does the OpenStreetMap website itself or
programs like git which are all programs whose UI messages I like.

I don't like using programs whose messages look like they're extracted
from a speech to be given at a fancy dinner party. It's OK to say
Oops in your error messages and not clutter up the UI by saying
please in every second word.

But that's just my opinion :)

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Marc Schütz
 Well Marc Schütz is in theory completely wrong that don't and do not
 are not freely interchangeable. Don't is a contraction of do not
 and means exactly the same thing by definition.

Then why is not this sentence right?


signature.asc
Description: This is a digitally signed message part.
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Frederik Ramm
Hi,

Marc Schütz wrote:
 Well Marc Schütz is in theory completely wrong that don't and do not
 are not freely interchangeable. Don't is a contraction of do not
 and means exactly the same thing by definition.
 
 Then why is not this sentence right?

Can we simply agree that the apostroph'd forms are not used in formal 
English and move on? Ain't so hard ;-)

Bye
Frederik

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Dirk Stöcker

On Wed, 13 Jan 2010, Marc Schütz wrote:


Well Marc Schütz is in theory completely wrong that don't and do not
are not freely interchangeable. Don't is a contraction of do not
and means exactly the same thing by definition.


Then why is not this sentence right?


Then why is this sentence not right?

Isn't replacement means not is not is at exactly the same position. I 
don't think you can find examples, where removing the contradiction will 
change the meaning.


Ciao
--
http://www.dstoecker.eu/ (PGP key available)___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Karl Guggisberg
Sure, but the latest commits fixing english messages are really exagerating

Its download link is not known. instead of isn't known ? Hey, these 
are just error messages, it's not the Queen addressing the nation.

--Karl

Am 13.01.2010 17:48, schrieb Frederik Ramm:
 Hi,

 Marc Schütz wrote:

 Well Marc Schütz is in theory completely wrong that don't and do not
 are not freely interchangeable. Don't is a contraction of do not
 and means exactly the same thing by definition.

 Then why is not this sentence right?
  
 Can we simply agree that the apostroph'd forms are not used in formal
 English and move on? Ain't so hard ;-)

 Bye
 Frederik

 ___
 josm-dev mailing list
 josm-dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/josm-dev

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Karl Guggisberg
forgot to add: thanks to mjulius and others for cleaning up all these 
messages! It was indeed necessary and the result is a big improvent, 
even though I feel that the wording could be a little bit less formal in 
some cases.
-- Karl

Sure, but the latest commits fixing english messages are really exagerating

Its download link is not known. instead of isn't known ? Hey, these 
are just error messages, it's not the Queen addressing the nation.

--Karl

Am 13.01.2010 17:48, schrieb Frederik Ramm:
 Hi,

 Marc Schütz wrote:

 Well Marc Schütz is in theory completely wrong that don't and do not
 are not freely interchangeable. Don't is a contraction of do not
 and means exactly the same thing by definition.

 Then why is not this sentence right?
  
 Can we simply agree that the apostroph'd forms are not used in formal
 English and move on? Ain't so hard ;-)

 Bye
 Frederik

 ___
 josm-dev mailing list
 josm-dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/josm-dev

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Marko Mäkelä
Resurfacing from lurk mode.  (I have been more active with mkgmap lately.)

On Wed, Jan 13, 2010 at 09:33:24AM -0500, Matthias Julius wrote:
 BTW, I came across a number of strings where single quotes were not
 escaped.  So I think this overhaul is a good thing.

You could open another can of worms and replace the ' with the UTF-8
curly quote ’. :-)

By the way, I filed two tickets against gettext-commons a long time ago.
Some weeks ago, the tickets were updated:

http://code.google.com/p/gettext-commons/issues/detail?id=30
http://code.google.com/p/gettext-commons/issues/detail?id=31

I should get around to checking if the i18n/build.xml could be rewritten
to use the portable ant tasks instead of invoking the gettext tools
directly.

Best regards,

Marko (User:Skela)

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Matthias Julius
Karl Guggisberg karl.guggisb...@guggis.ch writes:

 I feel that the wording could be a little bit less formal in some
 cases.  -- Karl

Sure, I only fixed some real errors and some plural issues.  Everybody
is certainly welcome to make sugestions.


 Sure, but the latest commits fixing english messages are really exagerating

 Its download link is not known. instead of isn't known ? Hey, these 
 are just error messages, it's not the Queen addressing the nation.

Well, while I was at it ...

I didn't want to think about each instance whether or not it is maybe
less important there.  At least all the strings are consistent now.
And, some of those were unescaped single quotes anyway.

Now I just need to fix those po files ...

Matthias

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-12 Thread Matthias Julius
Andre Hinrichs andre.hinri...@gmx.de writes:

 Hi List!

 Since I currently check all translatable texts I found that sometimes
 quotes are single and sometimes double. E.g. isn't is sometimes simply
 isn't and sometimes isn''t.

 Which is the correct way?

The correct way will be to escape single quotes with another one (''),
always.

In the near future all translations will be fed through
MessageFormat.format(), so they all get the same treatment.

Also, I want to change all those don'ts and won'ts to proper English.
This doesn't change the meaning of the string, so all the translations
(hopefully) just need to be unfuzzied.

There are a couple of other minor issues I came across that will get
fixed on the way.

For translators it is probably best to take a break (and go mapping or
so) and wait for things to calm down.  I guess Dirk should call a String
Freeze at some point.

Matthias

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-12 Thread Andre Hinrichs
Am Mittwoch, den 13.01.2010, 00:22 -0500 schrieb Matthias Julius:
 Andre Hinrichs andre.hinri...@gmx.de writes:
 
  Hi List!
 
  Since I currently check all translatable texts I found that sometimes
  quotes are single and sometimes double. E.g. isn't is sometimes simply
  isn't and sometimes isn''t.
 
  Which is the correct way?
 
 The correct way will be to escape single quotes with another one (''),
 always.
 
 In the near future all translations will be fed through
 MessageFormat.format(), so they all get the same treatment.

That would make things easier.

 Also, I want to change all those don'ts and won'ts to proper English.
 This doesn't change the meaning of the string, so all the translations
 (hopefully) just need to be unfuzzied.

I thought, these don'ts and won'ts is proper english. Am I wrong?

 There are a couple of other minor issues I came across that will get
 fixed on the way.

I've found another british-american issue with the word authorise.
Since texts (and maybe also methods and variables) should be in american
english authorise should be changed to authorize.

 For translators it is probably best to take a break (and go mapping or
 so) and wait for things to calm down.  I guess Dirk should call a String
 Freeze at some point.


Andre



___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-10 Thread Ævar Arnfjörð Bjarmason
On Sun, Jan 10, 2010 at 15:00, Andre Hinrichs andre.hinri...@gmx.de wrote:
 Hi List!

 Since I currently check all translatable texts I found that sometimes
 quotes are single and sometimes double. E.g. isn't is sometimes simply
 isn't and sometimes isn''t.

 Which is the correct way?

It's always a single quite in English, but perhaps they're double
quotes in the JOSM source to work around something?:

aoeu josm (r2766) $ ack tr\(.*isn''t src
src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
219:setErrorMessage(tfLatValue,tr(The string ''{0}''
isn''t a valid double value., tfLatValue.getText()));
251:setErrorMessage(tfLonValue,tr(The string ''{0}''
isn''t a valid double value., tfLonValue.getText()));

src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
160:feedbackInvalid(tr(The string ''{0}'' isn''t a
valid double value., getComponent().getText()));
200:feedbackInvalid(tr(The string ''{0}'' isn''t a
valid double value., getComponent().getText()));

src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
533:throw new IllegalStateException(tr(Current
value ''{0}'' for user ID isn''t valid, tfUid.getText()));

 Forthermore I find sometimes american english (e.g. 'initialize').
 Wasn't the overall policy to use british english?

I thought the source default was en_US since if it was en_GB the
existing en_GB translation would be pointless (and we'd need a en_US
one).

 And finally sometimes I find XHTML style end tags in translated texts
 (e.g. 'br /' instead of 'br'). By now I haven't found any in the
 source. Is it ok to use them or should these be fixed?

The HTML is rendered by some internal Java stuff, both of those tags
work just as well when fed to it so I don't think it needs to be fixed
either way.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-10 Thread Karl Guggisberg
Hi,

  It's always a single quite in English, but perhaps they're double
  quotes in the JOSM source to work around something?:

tr(abc) doesn't use MessageFormat. A single quote in tr(...) therefore 
isn't a meta-character and is copied to the output.
   tr(a single quote ' )  -  a single quote '

tr(a {0}, test) uses MessageFormat. There, single quotes are 
meta-character. A single quote is the (close) equivalent to  \ in regexp: it 
allows to escape curly braces. '} is }, '' is '.Therefore, if you have a I18n 
string with format placeholders and single quotes, you MUST escape them with 
two quotes. If you don't MessageFormat won't process the format placeholders 
correctly and single quotes are deleted.
   tr(a single quote '' - {0} , OK)  -  a single quote ' - OK
   tr(a single quote ' - {0} , NOK)  -  a single quote  - NOK  (or a 
single quote - {0} because formatting fails)


At least that's what you have to do today unless somebody changes the tr() 
implementations in I18n. If tr(...) was to use MessageFormat too, single 
quotes would always have to be escaped with another single quote.

  The HTML is rendered by some internal Java stuff, both of those tags
  work just as well when fed to it so I don't think it needs to be fixed
  either way.
AFAIK, the internal Java stuff doesn't support br/. Even worse, if you use 
it instead ofbr the HTML rendering is sometimes messed up. This holds for 
labels, tooltips and for JEditorPane.

Regards
Karl




Am 10.01.2010 16:13, schrieb Ævar Arnfjörð Bjarmason:
 On Sun, Jan 10, 2010 at 15:00, Andre Hinrichsandre.hinri...@gmx.de  wrote:

 Hi List!

 Since I currently check all translatable texts I found that sometimes
 quotes are single and sometimes double. E.g. isn't is sometimes simply
 isn't and sometimes isn''t.

 Which is the correct way?
  
 It's always a single quite in English, but perhaps they're double
 quotes in the JOSM source to work around something?:

 aoeu josm (r2766) $ ack tr\(.*isn''t src
 src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
 219:setErrorMessage(tfLatValue,tr(The string ''{0}''
 isn''t a valid double value., tfLatValue.getText()));
 251:setErrorMessage(tfLonValue,tr(The string ''{0}''
 isn''t a valid double value., tfLonValue.getText()));

 src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
 160:feedbackInvalid(tr(The string ''{0}'' isn''t a
 valid double value., getComponent().getText()));
 200:feedbackInvalid(tr(The string ''{0}'' isn''t a
 valid double value., getComponent().getText()));

 src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
 533:throw new IllegalStateException(tr(Current
 value ''{0}'' for user ID isn''t valid, tfUid.getText()));


 Forthermore I find sometimes american english (e.g. 'initialize').
 Wasn't the overall policy to use british english?
  
 I thought the source default was en_US since if it was en_GB the
 existing en_GB translation would be pointless (and we'd need a en_US
 one).


 And finally sometimes I find XHTML style end tags in translated texts
 (e.g. 'br /' instead of'br'). By now I haven't found any in the
 source. Is it ok to use them or should these be fixed?
  
 The HTML is rendered by some internal Java stuff, both of those tags
 work just as well when fed to it so I don't think it needs to be fixed
 either way.

 ___
 josm-dev mailing list
 josm-dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/josm-dev



___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-10 Thread Andre Hinrichs
Am Sonntag, den 10.01.2010, 16:31 +0100 schrieb Karl Guggisberg:
 Hi,
 
   It's always a single quite in English, but perhaps they're double
   quotes in the JOSM source to work around something?:
 
 tr(abc) doesn't use MessageFormat. A single quote in tr(...) therefore 
 isn't a meta-character and is copied to the output.
tr(a single quote ' )  -  a single quote '
 
 tr(a {0}, test) uses MessageFormat. There, single quotes are 
 meta-character. A single quote is the (close) equivalent to  \ in regexp: it 
 allows to escape curly braces. '} is }, '' is '.Therefore, if you have a I18n 
 string with format placeholders and single quotes, you MUST escape them with 
 two quotes. If you don't MessageFormat won't process the format placeholders 
 correctly and single quotes are deleted.
tr(a single quote '' - {0} , OK)  -  a single quote ' - OK
tr(a single quote ' - {0} , NOK)  -  a single quote  - NOK  (or a 
 single quote - {0} because formatting fails)

Ok, understood. Only thing is, that in Launchpad I cannot see whether it
is a MessageFormat or not. So I have to trust the original text to be in
correct format, haven't I?

 At least that's what you have to do today unless somebody changes the tr() 
 implementations in I18n. If tr(...) was to use MessageFormat too, single 
 quotes would always have to be escaped with another single quote.
 
   The HTML is rendered by some internal Java stuff, both of those tags
   work just as well when fed to it so I don't think it needs to be fixed
   either way.
 AFAIK, the internal Java stuff doesn't support br/. Even worse, if you 
 use it instead ofbr the HTML rendering is sometimes messed up. This holds 
 for labels, tooltips and for JEditorPane.

I'll check that later this evening.

 Am 10.01.2010 16:13, schrieb Ævar Arnfjörð Bjarmason:
  On Sun, Jan 10, 2010 at 15:00, Andre Hinrichsandre.hinri...@gmx.de  wrote:
 
  Hi List!
 
  Since I currently check all translatable texts I found that sometimes
  quotes are single and sometimes double. E.g. isn't is sometimes simply
  isn't and sometimes isn''t.
 
  Which is the correct way?
   
  It's always a single quite in English, but perhaps they're double
  quotes in the JOSM source to work around something?:
 
  aoeu josm (r2766) $ ack tr\(.*isn''t src
  src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
  219:setErrorMessage(tfLatValue,tr(The string ''{0}''
  isn''t a valid double value., tfLatValue.getText()));
  251:setErrorMessage(tfLonValue,tr(The string ''{0}''
  isn''t a valid double value., tfLonValue.getText()));
 
  src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
  160:feedbackInvalid(tr(The string ''{0}'' isn''t a
  valid double value., getComponent().getText()));
  200:feedbackInvalid(tr(The string ''{0}'' isn''t a
  valid double value., getComponent().getText()));
 
  src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
  533:throw new IllegalStateException(tr(Current
  value ''{0}'' for user ID isn''t valid, tfUid.getText()));
 
 
  Forthermore I find sometimes american english (e.g. 'initialize').
  Wasn't the overall policy to use british english?
   
  I thought the source default was en_US since if it was en_GB the
  existing en_GB translation would be pointless (and we'd need a en_US
  one).

Makes sense. The only british english policy is for the OSM tags, I
think.

  And finally sometimes I find XHTML style end tags in translated texts
  (e.g. 'br /' instead of'br'). By now I haven't found any in the
  source. Is it ok to use them or should these be fixed?
   
  The HTML is rendered by some internal Java stuff, both of those tags
  work just as well when fed to it so I don't think it needs to be fixed
  either way.


Thank you both for the quit response!


Regards
Andre



___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-10 Thread Karl Guggisberg
Hi Andre

  Ok, understood. Only thing is, that in Launchpad I cannot see whether it
  is a MessageFormat or not. So I have to trust the original text to be in
  correct format, haven't I?
Yes, you can. If there is at least one format placeholder {0}, {1}, etc. in the 
text you see in Launchpad, then you must escape all single quotes with another 
single quote. If there isn't, you shouldn't escape them.

Regards Karl


Am 10.01.2010 16:53, schrieb Andre Hinrichs:
 Am Sonntag, den 10.01.2010, 16:31 +0100 schrieb Karl Guggisberg:

 Hi,

  
   It's always a single quite in English, but perhaps they're double
   quotes in the JOSM source to work around something?:

 tr(abc) doesn't use MessageFormat. A single quote in tr(...) therefore 
 isn't a meta-character and is copied to the output.
 tr(a single quote ' )  -   a single quote '

 tr(a {0}, test) uses MessageFormat. There, single quotes are 
 meta-character. A single quote is the (close) equivalent to  \ in regexp: it 
 allows to escape curly braces. '} is }, '' is '.Therefore, if you have a 
 I18n string with format placeholders and single quotes, you MUST escape them 
 with two quotes. If you don't MessageFormat won't process the format 
 placeholders correctly and single quotes are deleted.
 tr(a single quote '' - {0} , OK)  -   a single quote ' - OK
 tr(a single quote ' - {0} , NOK)  -   a single quote  - NOK  (or 
 a single quote - {0} because formatting fails)
  
 Ok, understood. Only thing is, that in Launchpad I cannot see whether it
 is a MessageFormat or not. So I have to trust the original text to be in
 correct format, haven't I?


 At least that's what you have to do today unless somebody changes the tr() 
 implementations in I18n. If tr(...) was to use MessageFormat too, single 
 quotes would always have to be escaped with another single quote.

  
   The HTML is rendered by some internal Java stuff, both of those tags
   work just as well when fed to it so I don't think it needs to be fixed
   either way.

 AFAIK, the internal Java stuff doesn't support br/. Even worse, if you 
 use it instead ofbr the HTML rendering is sometimes messed up. This 
 holds for labels, tooltips and for JEditorPane.
  
 I'll check that later this evening.


 Am 10.01.2010 16:13, schrieb Ævar Arnfjörð Bjarmason:
  
 On Sun, Jan 10, 2010 at 15:00, Andre Hinrichsandre.hinri...@gmx.de   
 wrote:


 Hi List!

 Since I currently check all translatable texts I found that sometimes
 quotes are single and sometimes double. E.g. isn't is sometimes simply
 isn't and sometimes isn''t.

 Which is the correct way?

  
 It's always a single quite in English, but perhaps they're double
 quotes in the JOSM source to work around something?:

 aoeu josm (r2766) $ ack tr\(.*isn''t src
 src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
 219:setErrorMessage(tfLatValue,tr(The string ''{0}''
 isn''t a valid double value., tfLatValue.getText()));
 251:setErrorMessage(tfLonValue,tr(The string ''{0}''
 isn''t a valid double value., tfLonValue.getText()));

 src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
 160:feedbackInvalid(tr(The string ''{0}'' isn''t a
 valid double value., getComponent().getText()));
 200:feedbackInvalid(tr(The string ''{0}'' isn''t a
 valid double value., getComponent().getText()));

 src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
 533:throw new IllegalStateException(tr(Current
 value ''{0}'' for user ID isn''t valid, tfUid.getText()));



 Forthermore I find sometimes american english (e.g. 'initialize').
 Wasn't the overall policy to use british english?

  
 I thought the source default was en_US since if it was en_GB the
 existing en_GB translation would be pointless (and we'd need a en_US
 one).

 Makes sense. The only british english policy is for the OSM tags, I
 think.


 And finally sometimes I find XHTML style end tags in translated texts
 (e.g. 'br /' instead of'br'). By now I haven't found any in the
 source. Is it ok to use them or should these be fixed?

  
 The HTML is rendered by some internal Java stuff, both of those tags
 work just as well when fed to it so I don't think it needs to be fixed
 either way.


 Thank you both for the quit response!


 Regards
 Andre





___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev