Re: i18n GER, suggestions, questions

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: i18n GER, suggestions, questions
Дата
Msg-id CA+OCxoz+9thEDLW9_WSrgxtReag2EZ3mXda_tCHAM5gGCiFFGA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: i18n GER, suggestions, questions  (Jonas Thelemann <e-mail@jonas-thelemann.de>)
Список pgadmin-hackers
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:

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


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

Предыдущее
От: Murtuza Zabuawala
Дата:
Сообщение: [pgAdmin4][PATCH] Fix the issue in browser tree
Следующее
От: Dave Page
Дата:
Сообщение: pgAdmin 4 commit: Write a JSON file when regression tests run,listing