Human Resources mailing list archives

hr@odoo-community.org

Avatar

Re: [OCA/hr] [IMP]: add unit in form selection widget (#1002)

by "Alexey Pelykh" <notifications@github.com> - 17/06/2021 07:34:05

@alexey-pelykh commented on this pull request.


In hr_holidays_credit/models/hr_leave_type.py:

> -                    else:
-                        extra = _('%g available')
-                    extra = extra % (
-                        float_round(
-                            record.virtual_remaining_leaves,
-                            precision_digits=2
-                        ) or 0.0,
-                    )
-                elif record.allow_credit:
-                    extra = _('%g used in credit') % (
-                        float_round(
-                            -record.virtual_remaining_leaves,
-                            precision_digits=2
-                        ) or 0.0,
-                    )
+                        extra += " " + _("+ credit")

Don't do this, it's incorrect for i18n to "construct" sentences. You have to localize either entire message or major part of it.


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.