Skip to content

[ADD] weblate-component-too-long: Check if the weblate component name is too long#175

Merged
moylop260 merged 2 commits intoOCA:mainfrom
vauxoo-dev:main-mod-too-long-moy
Jan 18, 2026
Merged

[ADD] weblate-component-too-long: Check if the weblate component name is too long#175
moylop260 merged 2 commits intoOCA:mainfrom
vauxoo-dev:main-mod-too-long-moy

Conversation

@moylop260
Copy link
Collaborator

@moylop260 moylop260 commented Jan 18, 2026

Check if the weblate component name
(which is formed by Repo Name + Odoo version + Module name) exceeds a certain length (90 characters).

If it does, register an error indicating that the module name is too long.

Related to

Raised from:

Where stock-logistics-release-channel-18.0-sale_stock_release_channel_delivery_date_plan_shipment_lead_time is 101 size

@moylop260 moylop260 self-assigned this Jan 18, 2026
@moylop260 moylop260 force-pushed the main-mod-too-long-moy branch from 59c8a32 to ebd25a3 Compare January 18, 2026 18:32
moylop260 added a commit to vauxoo-dev/stock-logistics-release-channel that referenced this pull request Jan 18, 2026
moylop260 added a commit to vauxoo-dev/stock-logistics-release-channel that referenced this pull request Jan 18, 2026
moylop260 added a commit to vauxoo-dev/stock-logistics-release-channel that referenced this pull request Jan 18, 2026
moylop260 added a commit to vauxoo-dev/stock-logistics-release-channel that referenced this pull request Jan 18, 2026
@moylop260
Copy link
Collaborator Author

@sbidoul

Please, review

The name of the check, the message

Notice the dummy PR:

@moylop260 moylop260 changed the title [ADD] component-too-long: Check if the weblate component name is too long [ADD] weblate-component-too-long: Check if the weblate component name is too long Jan 18, 2026
@moylop260 moylop260 force-pushed the main-mod-too-long-moy branch from a3fae7d to 6d85807 Compare January 18, 2026 18:59
… is too long

Check if the weblate component name which is formed by:
- Repo Name
- Odoo version
- Module name

If it exceeds a certain length (90 characters) register an error
indicating that the module name is too long.
…over all the tests together insteaad of individual
@moylop260 moylop260 force-pushed the main-mod-too-long-moy branch from 6d85807 to 0cf591a Compare January 18, 2026 21:10
@moylop260 moylop260 merged commit 63b3afa into OCA:main Jan 18, 2026
18 checks passed
@moylop260 moylop260 deleted the main-mod-too-long-moy branch January 18, 2026 21:12
Copy link

@hparfr hparfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

The error message is clear. 👍

@sbidoul
Copy link
Member

sbidoul commented Jan 19, 2026

Thanks @moylop260 ! If you compute the full length like that you can set the limit to 100 instead of 90.

@moylop260
Copy link
Collaborator Author

Hi @sbidoul

I agree with your reasoning regarding the limit.

However, I just wanted to share a couple of thoughts before:

Module Portability

Sometimes we move modules between projects.
If the new project has a slightly longer name, having a bit of a buffer (headroom) prevents immediate failures.

Custom Branches

While rare, some custom repositories (not OCA) might use branch names like saas-xx.y
which could trigger the limit if it's too tight.

I agree that your initial value of 90 having a small margin for error might be safer than fitting it to the exact character count.

What do you think? If you still prefer the stricter limit, let me know and I'll open the PR to adjust it, no problem!

@moylop260
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants