Re: [android-developers] Formatted string and localization problem

2012-06-21 Thread Francisco M. Marzoa Alonso
Hi,

Thanks a lot for your instructive answer. I have no strings in my
application where the order of the arguments are relevant, but I will
bear this in mind for further.

Best regards,


On 21/06/12 17:55, Tor Norbye wrote:
> You need to number the string arguments because in some translations, the
> order in which the substitutions appear may not be the same. If you just
> use %s, there is no way to for example use the second argument earlier than
> the first; it will need to find the first occurrence of %s and match it
> with the first parameter, and so on. With numbered arguments, one
> translation could do this:  "Dear %2$s, %1$s." (for example when the
> strings represent first and last names, where there are different
> conventions across localizations.)
>
> -- Tor
>
> On Thu, Jun 21, 2012 at 8:24 AM, Francisco M. Marzoa Alonso <
> fmmar...@gmail.com> wrote:
>
>> Well, the other approach also seems to solve the problem, so as both
>> approaches seems to solve the problem, I do not see the difference
>> between them. And your answer didn't help me, indeed.
>>
>> BTW, there is no need of being so high-handed when answering.
>>
>> Best regards,
>>
>>
>> On 21/06/12 17:11, Justin Anderson wrote:
 Is there some difference with your proposal?

>>> Yes, the difference is that his fixes the problem.  Did you try it?
>>>
>>> Thanks,
>>> Justin Anderson
>>> MagouyaWare Developer
>>> http://sites.google.com/site/magouyaware
>>>
>>>
>>> On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso <
>>> fmmar...@gmail.com> wrote:
>>>
 Is there some difference with your proposal?

>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Formatted string and localization problem

2012-06-21 Thread Tor Norbye
You need to number the string arguments because in some translations, the
order in which the substitutions appear may not be the same. If you just
use %s, there is no way to for example use the second argument earlier than
the first; it will need to find the first occurrence of %s and match it
with the first parameter, and so on. With numbered arguments, one
translation could do this:  "Dear %2$s, %1$s." (for example when the
strings represent first and last names, where there are different
conventions across localizations.)

-- Tor

On Thu, Jun 21, 2012 at 8:24 AM, Francisco M. Marzoa Alonso <
fmmar...@gmail.com> wrote:

> Well, the other approach also seems to solve the problem, so as both
> approaches seems to solve the problem, I do not see the difference
> between them. And your answer didn't help me, indeed.
>
> BTW, there is no need of being so high-handed when answering.
>
> Best regards,
>
>
> On 21/06/12 17:11, Justin Anderson wrote:
> >> Is there some difference with your proposal?
> >>
> > Yes, the difference is that his fixes the problem.  Did you try it?
> >
> > Thanks,
> > Justin Anderson
> > MagouyaWare Developer
> > http://sites.google.com/site/magouyaware
> >
> >
> > On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso <
> > fmmar...@gmail.com> wrote:
> >
> >> Is there some difference with your proposal?
> >>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Formatted string and localization problem

2012-06-21 Thread Justin Anderson
I didn't notice the additional *formatted="false" *attribute when you
applied...  So when I read your response it seemed like you ignored what
was suggested and didn't try it.

I was not meaning to come across as high-handed.  There are a number of
people who, when given an answer, ignore it and/or don't even try it...
That is what it seemed like you were doing.

Since that is not the case, I apologize.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Jun 21, 2012 at 9:24 AM, Francisco M. Marzoa Alonso <
fmmar...@gmail.com> wrote:

> Well, the other approach also seems to solve the problem, so as both
> approaches seems to solve the problem, I do not see the difference
> between them. And your answer didn't help me, indeed.
>
> BTW, there is no need of being so high-handed when answering.
>
> Best regards,
>
>
> On 21/06/12 17:11, Justin Anderson wrote:
> >> Is there some difference with your proposal?
> >>
> > Yes, the difference is that his fixes the problem.  Did you try it?
> >
> > Thanks,
> > Justin Anderson
> > MagouyaWare Developer
> > http://sites.google.com/site/magouyaware
> >
> >
> > On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso <
> > fmmar...@gmail.com> wrote:
> >
> >> Is there some difference with your proposal?
> >>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Formatted string and localization problem

2012-06-21 Thread Francisco M. Marzoa Alonso
Well, the other approach also seems to solve the problem, so as both
approaches seems to solve the problem, I do not see the difference
between them. And your answer didn't help me, indeed.

BTW, there is no need of being so high-handed when answering.

Best regards,


On 21/06/12 17:11, Justin Anderson wrote:
>> Is there some difference with your proposal?
>>
> Yes, the difference is that his fixes the problem.  Did you try it?
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso <
> fmmar...@gmail.com> wrote:
>
>> Is there some difference with your proposal?
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Formatted string and localization problem

2012-06-21 Thread Justin Anderson
>
> Is there some difference with your proposal?
>
Yes, the difference is that his fixes the problem.  Did you try it?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Jun 21, 2012 at 2:08 AM, Francisco M. Marzoa Alonso <
fmmar...@gmail.com> wrote:

> Is there some difference with your proposal?
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Formatted string and localization problem

2012-06-21 Thread Francisco M. Marzoa Alonso
Hi Tor,

I used this instead:

Couldn\'t load
music file %s (%s)

Is there some difference with your proposal?

Thanks a lot in advance,


On 20/06/12 20:35, Tor Norbye wrote:
> Try   Couldn\'t load music file
> %1$s (%2$s)
>
> -- Tor
>
> On Wed, Jun 20, 2012 at 11:31 AM, Francisco M. Marzoa Alonso <
> fmmar...@gmail.com> wrote:
>
>> Hi there,
>>
>> I have a l10n string that I need to format later, it looks like this:
>>
>>Couldn\'t load music file %s
>> (%s)
>>
>> But Eclipse complains about a couple of errors on XML parsing:
>>
>> - error: Multiple substitutions specified in non-positional format; did
>> you mean to add the formatted="false" attribute?
>> - error: Unexpected end tag string
>>
>> It dissapear adding that formatted="false" attributed, but I am curious
>> about that...
>>
>> I use these %s because I will use Formatter.format later to build an
>> string with the file name that raises the exception and the e.toString()
>> output.
>>
>> Regards,
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Formatted string and localization problem

2012-06-20 Thread Tor Norbye
Try   Couldn\'t load music file
%1$s (%2$s)

-- Tor

On Wed, Jun 20, 2012 at 11:31 AM, Francisco M. Marzoa Alonso <
fmmar...@gmail.com> wrote:

> Hi there,
>
> I have a l10n string that I need to format later, it looks like this:
>
>Couldn\'t load music file %s
> (%s)
>
> But Eclipse complains about a couple of errors on XML parsing:
>
> - error: Multiple substitutions specified in non-positional format; did
> you mean to add the formatted="false" attribute?
> - error: Unexpected end tag string
>
> It dissapear adding that formatted="false" attributed, but I am curious
> about that...
>
> I use these %s because I will use Formatter.format later to build an
> string with the file name that raises the exception and the e.toString()
> output.
>
> Regards,
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en