Skip to content

Conversation

@lectrician1
Copy link

@lectrician1 lectrician1 commented Feb 5, 2023

This adds the Translate extension to the Wiki.

All other extension dependencies have already been installed so no other extensions are added as part of this request.

User rights and the new role of "translateadmin" have been configured according to the original proposal.

The OSM ElasticSearch server will now be utilized for storing translation memories.

Closes openstreetmap/operations#649

@tomhughes tomhughes force-pushed the master branch 2 times, most recently from 3b728d8 to 4ae2339 Compare March 5, 2023 12:47
@tomhughes tomhughes force-pushed the master branch 2 times, most recently from 3cc04b0 to 82f971c Compare May 2, 2023 23:46
@tomhughes tomhughes force-pushed the master branch 2 times, most recently from 749a519 to b7e5b92 Compare July 4, 2023 09:37
@lectrician1
Copy link
Author

Could someone please review this? It has been over a year since the proposal passed to add this.

@Firefishy
Copy link
Member

Can you tell me what functionality this introduces?

@lectrician1
Copy link
Author

@Firefishy Please see the proposal for an in-depth description about what functionality it offers.

@tomhughes tomhughes force-pushed the master branch 2 times, most recently from 0305831 to e3574f3 Compare August 3, 2023 08:00
@lectrician1
Copy link
Author

lectrician1 commented Aug 9, 2023

So... update?

@Firefishy
Copy link
Member

Will you be around when this causes the wiki to break or block upgrades? This is a fairly deep plugin. I am not comfortable supporting it on my own.

@lectrician1
Copy link
Author

I will be. Honestly I have not tested this PR with the current Wiki stack since I don't have chef setup or anything and don't really know how to set it up. I guess creating that docker container for the wiki which has been something I've wanted to do we might think of doing before this as well to test it (openstreetmap/operations#873).

@pnorman
Copy link
Collaborator

pnorman commented Aug 10, 2023

If we install it and then have to remove it in a couple months, what are the consequences? What's the uninstall procedure?

@lectrician1
Copy link
Author

@pnorman All the pages created as "translated" pages will just be kept in normal page form. For example, Key:Highway and its Spanish translation produced by the Translate extension at Key:Highway/es will become normal pages at Key:Highway and Key:Highway/es. We will need to add the {{Languages}} template to those pages but that should be pretty easy to automate.

@tomhughes tomhughes force-pushed the master branch 3 times, most recently from d3175b1 to a07b42e Compare October 15, 2023 17:47
@tomhughes tomhughes force-pushed the master branch 2 times, most recently from 74f83a1 to 73471b4 Compare November 23, 2023 00:44
@tomhughes tomhughes force-pushed the master branch 2 times, most recently from 013d3ba to c295927 Compare March 15, 2024 10:45
Comment on lines +27 to +36
$wgTranslateTranslationServices['TTMServer'] = array(
'type' => 'ttmserver',
'class' => 'ElasticSearchTTMServer',
'cutoff' => 0.75,
/*
* See http://elastica.io/getting-started/installation.html
* See https://github.com/ruflin/Elastica/blob/8.x/src/Client.php
*/
'config' => [ 'servers' => [ 'host' => '127.0.0.1', 'port' => 9114 ] ]
);
Copy link

@lens0021 lens0021 May 12, 2024

Choose a reason for hiding this comment

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

Suggested change
$wgTranslateTranslationServices['TTMServer'] = array(
'type' => 'ttmserver',
'class' => 'ElasticSearchTTMServer',
'cutoff' => 0.75,
/*
* See http://elastica.io/getting-started/installation.html
* See https://github.com/ruflin/Elastica/blob/8.x/src/Client.php
*/
'config' => [ 'servers' => [ 'host' => '127.0.0.1', 'port' => 9114 ] ]
);
$wgTranslateTranslationServices['TTMServer'] = [
'type' => 'ttmserver',
'class' => 'ElasticSearchTTMServer',
'cutoff' => 0.75,
/*
* See http://elastica.io/getting-started/installation.html
* See https://github.com/ruflin/Elastica/blob/8.x/src/Client.php
*/
'config' => [ 'servers' => [ 'host' => '127.0.0.1', 'port' => 9114 ] ]
];

The mix use of old syntax and new syntax has slightly confused me :)


wfLoadExtension( 'Translate' );
$wgGroupPermissions['user']['translate'] = true;
$wgGroupPermissions['user']['skipcaptcha'] = true; // Bug 34182: needed with ConfirmEdit

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Though the bug, I am not sure if it is good to disable the captcha for all logged-in users.
In another perspective, does OSM wiki have ConfirmEdit enabled? (Is this line needed?)
Anyway, I think it would be good if 'autoconfirmed' is used than 'user'.

Copy link
Member

Choose a reason for hiding this comment

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

Yes we have ConfirmEdit installed using hcaptcha.

Comment on lines +19 to +23
/**
* Add a preference "Do not send me email newsletters" in the email preferences.
*/
$wgTranslateNewsletterPreference = true;

Copy link

@lens0021 lens0021 May 12, 2024

Choose a reason for hiding this comment

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

Suggested change
/**
* Add a preference "Do not send me email newsletters" in the email preferences.
*/
$wgTranslateNewsletterPreference = true;

This configuration variable removed in 2020. (MediaWiki 1.35)

wikimedia/mediawiki-extensions-Translate@1c43244
Bug: T134633

Copy link
Member

Choose a reason for hiding this comment

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

How exactly does a translation extension involve sending newsletters? If adding this extension is going to result is us sending bulk emails then we're going to need a clear understanding of what it will be doing and the legal/privacy implications...

Copy link

Choose a reason for hiding this comment

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

You don't have to worry about it because the code does not exist anymore. It seems the configuration only provided a checkbox on the preference page. So maybe the publisher of the newsletter had manually sent mails? I don't know.

@lens0021
Copy link

Honestly I have not tested this PR with the current Wiki stack since I don't have chef setup or anything and don't really know how to set it up.

@lectrician1 If you can, could you please take the time to test it with Chef?

If we install it and then have to remove it in a couple months, what are the consequences? What's the uninstall procedure?

@Nikerabbit I am sorry to mention you suddenly. Do you know what will happen if Translate extension is uninstalled? Are there any cases of this happened on any wiki?

@Nikerabbit
Copy link
Contributor

Not to my knowledge. Main changes would be tags would displaying verbatim and all translations would become editable as normal pages.

@lectrician1
Copy link
Author

lectrician1 commented Sep 2, 2024

@lens0021 I do not have a local dev environment for the chef configuration. Is it that hard to setup? The configuration looks very osm-server specific.

Could someone else possibly test the configuration who has a running chef environment?

@Firefishy
Copy link
Member

@1ec5 Do we want the Translate extension? I can revive this PR if yes.

@1ec5
Copy link

1ec5 commented Oct 17, 2025

Yes, I do think we want the Translate extension. For now the translation administrators would only enable it for stuff other than tag description pages.

@tomhughes seems to have adapted this PR for the test wiki in 0cd4d0d and bbb97ed. Unfortunately we hit an error in Special:SearchTranslations that hampered one of the key features, translation memory. It might have to do with WikibaseCirrusSearch (openstreetmap/operations#903), which is also being tested on the test wiki simultaneously. I don’t think Translate actually depends on WikibaseCirrusSearch; we just ended up testing both extensions in tandem.

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.

Add Translate extension to main wiki

7 participants