Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Add translatewiki link#768

Merged
samwilson merged 4 commits intowikimedia:mainfrom
3333nischay:add-translatewiki-link
Jan 8, 2025
Merged

Add translatewiki link#768
samwilson merged 4 commits intowikimedia:mainfrom
3333nischay:add-translatewiki-link

Conversation

@3333nischay
Copy link
Contributor

Ticket: T241500

Query: The footer of SVG Translate includes useful links but lacks a direct link to Translatewiki making it difficult for users to find and contribute translations. Adding this link would improve accessibility and streamline the translation process.

This PR enhances the footer of SVG Translate by adding a direct link to Translatewiki, making it easier for users to contribute translations and support the tool.

Changes Made:

  1. Added a new translation key:

    • Introduced "translatewiki": "Translate on Translatewiki" to the all the language files available in i18n directory in the respective languages.
    • Added corresponding translations in multiple language files to encourage users to help translate the tool.
  2. Updated the footer template:

    • Modified templates/base.html.twig to include the Translatewiki link:
      <li><a href="https://translatewiki.net/wiki/Special:Translate/svgtranslate?group=svgtranslate&language=en&filter=%21translated&action=translate">{{ msg('translatewiki') }}</a></li>
      

This update improves accessibility and streamlines the translation process for contributors.

Copy link
Member

@samwilson samwilson left a comment

Choose a reason for hiding this comment

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

Thanks for this!

How did you create the translations for all the different languages? If you speak all these then that's fine, but if you used machine translation then I'm sorry to say that it's going to be best to remove them.

When adding new messages to a project, we only have to add them to the en.json and qqq.json files, and translatewiki.net will do the rest for us. They have built-in machine translation and other suggestion systems that make it quick and easy for translators there to add the missing languages, so it's actually better for us to not do them.

{% endset %}
<li><a href="https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?title=%5BBUG%5D%20...&description={{ issue_template|escape('url') }}&projects=community-tech,svg_translate_tool&priority=triage">{{ msg('report-issue') }}</a></li>
<li><a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Community_Tech/SVG_translation">{{ msg('help') }}</a></li>
<li><a href="https://translatewiki.net/wiki/Special:Translate/svgtranslate?group=svgtranslate&language=en&filter=%21translated&action=translate">{{ msg('translatewiki') }}</a></li>
Copy link
Member

Choose a reason for hiding this comment

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

This URL should probably just be https://translatewiki.net/wiki/Special:Translate/svgtranslate, so that the user's own settings are used for the target language (i.e. setting language=en just results in a warning because it's the same as the base language).

i18n/en.json Outdated
"report-issue": "Report a bug",
"view-source": "View on Github"
"view-source": "View on Github",
"translatewiki": "Help translate this tool on Translatewiki"
Copy link
Member

Choose a reason for hiding this comment

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

I think a shorter message might be good, e.g. "Translate on translatewiki.net", so it doesn't take up too much space:

image

Note also that normal way that translatewiki.net is written is like that, all lowercase and with the ".net".

@3333nischay
Copy link
Contributor Author

3333nischay commented Jan 6, 2025 via email

…e in en.json and qqq.json and changed the link to the page}
@3333nischay 3333nischay requested a review from samwilson January 6, 2025 14:28
@3333nischay
Copy link
Contributor Author

Removed the translatewiki message form all the language files except en.json and qqq.json. Changed the message to "translatewiki": "Translate this tool" and changed the link address to translatewiki.net.

Copy link
Member

@samwilson samwilson left a comment

Choose a reason for hiding this comment

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

Thanks!

It looks like you've still got translations for anp, ar, as, ast, az, and da, as well as introducing some blank lines for other langs.

i18n/qqq.json Outdated
"report-issue": "Label for issue-reporting link to Phabricator. Displayed in the footer on every page.",
"view-source": "Label for the link to the Github project page. Displayed in the footer on every page."
"view-source": "Label for the link to the Github project page. Displayed in the footer on every page.",
"translatewiki": "Translate this tool. Displayed in the footer on every page."
Copy link
Member

Choose a reason for hiding this comment

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

These are the instructions for translators, who can already see the "Translate this tool" base text. It's good to explain how the text is to be used (i.e. that it's a link).

@3333nischay 3333nischay requested a review from samwilson January 7, 2025 20:14
@3333nischay
Copy link
Contributor Author

removed the translations form anp, ar, as, ast, az, and da and extra blank lines. Also explained the tool in qqq.json as "translatewiki": "This is a link for the translate tool (translatewiki.net). Displayed in the footer on every page."

Copy link
Member

@samwilson samwilson left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

You have removed the trailing newlines on all the translation files, but that doesn't matter too much. Let's merge this!

@samwilson samwilson merged commit 51e20dd into wikimedia:main Jan 8, 2025
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants