Re: [pgadmin-hackers] i18n GER, suggestions, questions

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: [pgadmin-hackers] i18n GER, suggestions, questions
Дата
Msg-id CA+OCxowA=KiaB=ZBUvAuPZ=CAKeGC=whJDBeSCGRL0_Ctik+Mw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pgadmin-hackers] i18n GER, suggestions, questions  (Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>)
Список pgadmin-hackers
On Thu, Apr 6, 2017 at 3:05 PM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:
>
>
> On Thu, Apr 6, 2017 at 1:40 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> On Thu, Apr 6, 2017 at 2:27 AM, Jonas Thelemann
>> <e-mail@jonas-thelemann.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


В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Murtuza Zabuawala
Дата:
Сообщение: Re: [pgadmin-hackers] i18n GER, suggestions, questions
Следующее
От: Shirley Wang
Дата:
Сообщение: Re: [pgadmin-hackers] [Design Update] Visual design of query editor and results table