OCA / pylint-odoo

Odoo plugin for Pylint
http://www.pylint.org
143 stars 168 forks source link

[ADD] translation-positional-used: New check to valid the allow change the order of string formatting #305

Closed moylop260 closed 3 years ago

moylop260 commented 3 years ago

If you are using:

Better using:

In order to allow other languages change the order

Fix https://github.com/OCA/pylint-odoo/issues/303

yajo commented 3 years ago

There's something wrong here. You're also checking strings such as "Your {} {} is shipping". But that's not a problem because:

  1. If you're using format string syntax, you would be able to use "Su {1} {0} está enviándose".
  2. That syntax should be instead forbidden completely due to security problems as explained in #304.
moylop260 commented 3 years ago

@Yajo Good point!

Could you check it again, please?

I just considered the printf cases The .format( ones could be translated as you said but avoid it from the another lint-check (no this one).

Thanks!

fernandahf commented 3 years ago

@luisg123v

Could you review this, please?

Regards.