Re: i18n GER, suggestions, questions

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
Cc: Jonas Thelemann <e-mail(at)jonas-thelemann(dot)de>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>, Surinder Kumar <surinder(dot)kumar(at)enterprisedb(dot)com>, Harshal Dhumal <harshal(dot)dhumal(at)enterprisedb(dot)com>
Subject: Re: i18n GER, suggestions, questions
Date: 2017-04-06 14:25:58
Message-ID: CA+OCxowA=KiaB=ZBUvAuPZ=CAKeGC=whJDBeSCGRL0_Ctik+Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Thu, Apr 6, 2017 at 3:05 PM, Murtuza Zabuawala
<murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>
>
> On Thu, Apr 6, 2017 at 1:40 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>> On Thu, Apr 6, 2017 at 2:27 AM, Jonas Thelemann
>> <e-mail(at)jonas-thelemann(dot)de> wrote:
>> > Thanks for committing! :)
>> >
>> >>> i18n-trim.diff
>> >>>
>> >>> Removed two linebreaks to improve translation experience.
>> >>
>> >> Hmm, I've applied that, but expect an ongoing battle between gettext
>> >> and
>> >> PEP8...
>> >>
>> > Ok, I had to look up what PEP8 is :D
>> > So the only problem was that, with those newlines I removed, the
>> > translatable strings contained many extremely useless whitespaces
>> > inserted
>> > by the code indentation. I guess a workaround could be to just remove
>> > the
>> > spaces like I've seen somewhere else already:
>> >
>> > ----------
>> > ----------"""abc \n
>> > def"""
>> > ----------
>> >
>> > instead of:
>> >
>> > ----------
>> > ----------"""abc def"""
>> > ----------
>> >
>> > and:
>> >
>> > ----------
>> > ----------"""abc \n
>> > ----------def"""
>> > ----------
>> >
>> > ... where dashes represent whitespaces.
>> > But that is just an idea and something somebody with better Python
>> > knowledge
>> > should decide :)
>>
>> Hmm, yeah. So we really need the messages to be a single string, as
>> the splits may not make sense in other languages, so this won't work:
>>
> This will return single string only, python won't add any extra whitespace
> or new line with this format.

Which one?

>>
>> >>> print("Hello " \
>> ... "How are you")
>>
>> This will result in extra whitespace:
>>
>> >>> print("Hello \
>> ... How are you")
>>
>> Whilst this will result in an extra line break:
>>
>> >>> print("""Hello
>> ... How are you""")
>>
>> I'm beginning to think we have no choice but to ignore PEP8 and not
>> allow strings to wrap except where we want them to. I can't find
>> anything on Google about other alternatives - EDB guys, any
>> suggestions?
>>
>> >> Can you provide patches for the changes above?
>> >
>> > Yes, I can do that, but not right away. I currently have some other
>> > things
>> > to complete in the next few weeks, but I'll try to fit that in.
>>
>> Cool, thanks!
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Shirley Wang 2017-04-06 14:27:20 Re: [Design Update] Visual design of query editor and results table
Previous Message Murtuza Zabuawala 2017-04-06 14:05:42 Re: i18n GER, suggestions, questions