Page MenuHomePhabricator

Allow translating Cat-a-lot's name
Closed, ResolvedPublicFeature

Description

The tool shows a yellow box at the bottom of the page with the label "Cat-a-lot" in it. This label should become translatable. This is particularly useful for languages that do not use Latin alphabet (e.g. Persian, Cantonese, Hindi, etc.) (request)

Cat-a-lot translations

English phrases from MediaWiki:Gadget-Cat-a-lot.js/translating can be translated and saved in MediaWiki:Gadget-Cat-a-lot.js/de.

In code translatable strings are configured here:

The displayed text in the code

Event Timeline

Hi @Zache, I wanted to let you know that I've completed the translation task for Cat-a-lot. While working on other tasks, I found myself feeling a bit stuck, so I decided to take a short break and work on smaller tasks to refresh my mind. It helped me regain focus, and I'm now ready to tackle the remaining challenges.

Here's the diff for this task.

I didn't have access to edit the translations page directly, but I tested the code in my personal sandbox, and it worked as expected. The only remaining step is to add translations for the label cat-a-lot-label in the various translation files.

Let me know if there's anything else I need to do for this task or if you have any feedback.

Hey, While reviewing the existing translations, I noticed that Hindi translations are not available. If adding them is something that needs to be done, I’d be happy to contribute, as I’m a native speaker of the language. Let me know if this would be helpful!

Actually yes, there could be also more general ticket for all to add missing translations in their languages. I will do it at some point today.

Thanks for confirming! That sounds like a great idea. Once the ticket is created, I’ll be happy to contribute Hindi translations.

@Zache
Task Completion Report:
I successfully made the "Cat-a-lot" label translatable:

In the msgs object, I added the following default translation

'cat-a-lot-label': 'Cat-a-lot',

And I replaced the hardcoded text with msg('label'):

.text( msg( 'label' ) ) // Made the label translatable

This change ensures that the "Cat-a-lot" label is now translatable, allowing the label to be displayed in various languages

Blocker:
Currently, I do not have access to edit the translation files directly (MediaWiki:Gadget-Cat-a-lot.js/de). Therefore, I am unable to see the changes in the actual interface
This is the difference

Hi @Zache
I’ve completed the translation updates for Cat-a-lot. While working on other tasks, I took a short break to focus on this, which helped me regain momentum.

Changes Made:
Added the "cat-a-lot-label" key in the msgs object to make it translatable.

Replaced the hardcoded text with msg('label') to support multi-language translations.

Ensured consistency between mw.messages.set and the msgs object.

Verified the implementation by testing in my personal sandbox.

Code Changes:
Added default translation in the msgs object:

'cat-a-lot-label': 'Cat-a-lot',

Updated the label to be translatable:
Before:

.text( 'Cat-a-lot' ) // Hardcoded text

After:

.text( msg( 'label' ) ) // Made the label translatable

Although I don’t have direct access to update the translation files (e.g., MediaWiki:Gadget-Cat-a-lot.js/[LANGUAGE]), so I tested the changes in my personal sandbox, and everything works as expected.

Let me know if any further refinements are needed or if there’s anything else I should address!

Thank you for both, I will close this as succesfully resolved. This is currently in requested changes to the official version originally by Adiba, but as other change both with correct solution can mark it as done in Outreachy stats.

I will comment it here when the update is merged to the official version.