← Back to team overview

kicad-developers team mailing list archive

Re: Problems regarding Weblate checks


Sorry, I responded too quickly.  Looking at this, it appears that Weblate
doesn't allow replacing a plain format string with a positional format

I'll open a bug report with Weblate to fix this.


On Thu, Jul 1, 2021 at 8:43 AM Seth Hillbrand <seth@xxxxxxxxxxxxx> wrote:

> Hello Rigo-
> The mismatching line breaks check can be useful in catching issues where
> there is semantic information in the break.  But you are correct that this
> check is not critical.  Since it breaks your translation, we should disable
> it.
> The issue of the C-format check is curious.  According to
> https://docs.weblate.org/en/latest/user/checks.html#c-format, your
> placeholder should be valid.  Perhaps there is another C-format check that
> it doesn't pass?
> -Seth
> On Thu, Jul 1, 2021 at 8:30 AM RigoLigo RLC <rigoligo03@xxxxxxxxx> wrote:
>> Recently I've found some annoying checks that are preventing some
>> proper translation being done (translations that don't pass the checks
>> won't be compiled into .mo file) when working on Simplified Chinese
>> translation.
>> 1. There must be same "lines" of text in original text and translated
>> text. This one is preventing the custom DRC rule syntax helps being
>> compiled. There's many manual line breaks in the text, probably to
>> manually control the dialog width, however the translated Chinese text
>> can be a bit shorter than English text, and there'll be a few lines
>> less than English text. Weblate noticed this issue and prevented the
>> text from being compiled. This check doesn't seem to make any sense
>> for me. Could you guys provide a good explanation?
>> 2. Words in English sentences can be different order from Chinese, for
>> example, "Pad 1 of J3" is actually "J3 的焊盘 1" when translated, so I
>> need to use order marks or whatever it is called in the translation
>> text, so "Through hole pad %s of %s" is translated as "%2$s 的通孔焊盘 %1$"
>> [1]. But this kind of order marking isn't in standard ISO C99 (it's an
>> POSIX standard instead), and C-format check of Weblate fails. I
>> checked GNU gettext docs and it said translators can rely on this
>> feature [2]. How do we solve this problem?
>> Rigo
>> [1]
>> https://hosted.weblate.org/translate/kicad/master-source/zh_Hans/?checksum=65ad27d657ff921f
>> [2]
>> https://www.gnu.org/software/gettext/manual/html_node/c_002dformat.html
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> --
> [image: KiCad Services Corporation Logo]
> Seth Hillbrand
> *Lead Developer*
> +1-530-302-5483‬
> Long Beach, CA
> www.kipro-pcb.com    info@xxxxxxxxxxxxx

[image: KiCad Services Corporation Logo]
Seth Hillbrand
*Lead Developer*
Long Beach, CA
www.kipro-pcb.com    info@xxxxxxxxxxxxx