Re: i18n GER, suggestions, questions

From: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
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:05:42
Message-ID: CAKKotZSy58BiT41UmMBwhg++ce8LRv+5JxFKa5rOD2j6pEcH-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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.

> >>> 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
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-04-06 14:25:58 Re: i18n GER, suggestions, questions
Previous Message Dave Page 2017-04-06 09:15:08 Jasmine tests failing on CI