Page MenuHomePhabricator

Remove Akan support from MediaWiki, ULS, and Wikimedia servers
Open, LowPublic

Description

The Akan language (ak) was added to MediaWiki in the mid-2000s. It was a mistake: Akan is a language group, which includes the Twi and Fante languages. They are related, but distinct. Both of them are also supported in MediaWiki.

There was a whole Wikipedia in the Akan language, but it was recently closed after there was clear consensus that the language of its content is the same as in the Twi Wikipedia.

There are very few localizations in Akan in translatewiki, and they can also be merged into Twi (I've already checked with a native speaker).

Some links for reference:

To avoid confusion and unnecessary contribution to a wrong language, the support for the Akan language should be removed as much as possible. Existing useful content should be merged into Twi or Fante, and the rest should be deleted.

Some things I can think of:

  • remove ak from Wikimedia servers configuration (patch for ImportSources)
  • remove ak from cxserver configuration (patch)
  • remove ak from translatewiki configuration (patch)
  • move content in ak on Wikidata to tw or fat or delete it. Wikidata query requested here.
  • remove ak from language-data (or at least declare it as deprecated) (pull request)
  • remove ak from Names.php (or at least declare it as deprecated) (patch)
  • remove ak from the Wikimedia Portal
  • move Wikipedia Android app localizations from ak to tw (done in translatewiki by @Amire80; deleted automatically in export)
  • remove ak from mobile apps' configurations. "Both iOS and Android apps have scripts that run periodically and update our list of supported wikis. If a certain wiki has been sunset, it will be picked up automatically and removed."- dbrant (pull request)
  • remove ak as a language from jquery.ime (but maybe unify the code for Twi, Akan, and Nzema) (pull request)
  • remove ak from SiteMatrix language list configuration

If anyone can think of anything more, please add it.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 951199 merged by jenkins-bot:

[mediawiki/core@master] Remove ak from core

https://gerrit.wikimedia.org/r/951199

Change 951090 merged by jenkins-bot:

[translatewiki@master] Remove ak from translatewiki

https://gerrit.wikimedia.org/r/951090

Two items are remaining still in this task:

  • move content in ak on Wikidata to tw or fat or delete it
  • remove ak from mobile apps' configurations

I am unsure how to approach them and which repositories/files to change. Thoughts?

Note that the name Akan doesn't show up in the SiteMatrix anymore, but it still has a row in there, with 3 closed projects and 5 missing (redlinked) projects. Surely this is not the desired final state of the SiteMatrix in relation to this task...?

Wikidata likely refers to updating labels and statements for Q-items on the wiki. Maybe also interlanguage links if those are still there.

SiteMatrix also lists closed wikis, so I don't see a problem with that. It would be different if those wikis were completely removed, which they have not been.

Wikidata likely refers to updating labels and statements for Q-items on the wiki. Maybe also interlanguage links if those are still there.

SiteMatrix also lists closed wikis, so I don't see a problem with that. It would be different if those wikis were completely removed, which they have not been.

Even if we keep the language data in the table, how to bring back the name in the language column on the left?

It's no longer possible to change ak values in Wikidata and Commons in any way because MediaWiki says the language code is invalid.

haslabel:ak now gives an error even though there are thousands of items with ak labels.

SiteMatrix also lists closed wikis, so I don't see a problem with that. It would be different if those wikis were completely removed, which they have not been.

Even if we keep the language data in the table, how to bring back the name in the language column on the left?

Autonyms come from Names.php

haslabel:ak now gives an error even though there are thousands of items with ak labels.

SPARQL (and presumably Quarry) still seems able to report ak labels (https://w.wiki/7P28), so that's something.

It's no longer possible to change ak values in Wikidata and Commons in any way because MediaWiki says the language code is invalid.

Can confirm that this also applies when using wikibase-cli - it returns an API error either for adding or removing ak labels. (code: 'badvalue', info: 'Unrecognized value for parameter "language": ak.',)

In terms of sitelinks, there are currently 325 akwiki sitelinks on Wikidata (https://w.wiki/7N$e) - all to internal pages (templates, categories, etc). I am guessing these can be more straightforwardly deleted if desired.

In terms of sitelinks, there are currently 325 akwiki sitelinks on Wikidata (https://w.wiki/7N$e) - all to internal pages (templates, categories, etc). I am guessing these can be more straightforwardly deleted if desired.

Note that Wikidata allows sitelinks to closed wikis, so they shouldn't be removed if the wiki is only going to be closed and not deleted.

Just posted this onwiki but to keep it all on one place - it looks like there are still 484k items with Akan labels (plus another 146k descriptions and 173k aliases, but I'm guessing those also have labels).

I don't see any obvious way of Wikidata being able to remove these unless ak is temporarily re-enabled as a language code, at which point it would be straightforward for a bot to remove them all, or else copy them to a new language code (tw?) if that's preferred.

Looks like some of the changes will have to be reverted so that other items can be completed. Can someone look into this please?

Autonyms come from Names.php

… or from InitialiseSettings.php's wmgExtraLanguageNames; since the problem with ak missing – as far as I can tell – is specific only to Wikidata, I would suggest adding it there.

Change 955007 had a related patch set uploaded (by Srishakatux; author: Srishakatux):

[operations/mediawiki-config@master] Add Akan language

https://gerrit.wikimedia.org/r/955007

… or from InitialiseSettings.php's wmgExtraLanguageNames; since the problem with ak missing – as far as I can tell – is specific only to Wikidata, I would suggest adding it there.

If I understood correctly, this Wikidata-specific change was needed in the operations/mediawiki-config repo.

Autonyms come from Names.php

… or from InitialiseSettings.php's wmgExtraLanguageNames; since the problem with ak missing – as far as I can tell – is specific only to Wikidata, I would suggest adding it there.

The comment I was replying to there was about making the name appear on https://meta.wikimedia.org/wiki/Special:SiteMatrix though.

{{#language:ak}} no longer displays an autonym now either (e.g. https://species.wikimedia.org/wiki/Diplopoda)

I don't see any obvious way of Wikidata being able to remove these unless ak is temporarily re-enabled as a language code, at which point it would be straightforward for a bot to remove them all, or else copy them to a new language code (tw?) if that's preferred.

ak is a macrolanguage containing both tw and fat. Some things can be fixed by a bot, like the items where the same text was copied to all labels, but the rest need to be checked by someone who is able to distinguish the two to determine which one should be used. There are some which include both tw and fat which need to be split (e.g. https://www.wikidata.org/wiki/Q7802), some where the ak label does not match either of the tw or fat labels (e.g. https://www.wikidata.org/wiki/Q41487), some which are in a different language entirely (e.g. https://www.wikidata.org/wiki/Property:P585)...

Hello,

Adding more context, the "ak" issue is also breaking some language-agnostic bot code (see: https://github.com/LeMyst/WikibaseIntegrator/issues/617) .

Basically, I am unable to write to items that have an "ak" label using WikibaseIntegrator even if I am not touching the "ak" text.

The code fetches the item from the API (with an ak label), adds an Item-valued statement, and then is unable to write the content back because of the ak label.

Hello,

Adding more context, the "ak" issue is also breaking some language-agnostic bot code (see: https://github.com/LeMyst/WikibaseIntegrator/issues/617) .

Basically, I am unable to write to items that have an "ak" label using WikibaseIntegrator even if I am not touching the "ak" text.

The code fetches the item from the API (with an ak label), adds an Item-valued statement, and then is unable to write the content back because of the ak label.

Pywikibot only modifies objects for which you've provided a key. So you can omit item.labels['ak'] and it won't be changed.

ABorbaWMF subscribed.

I don't see Akan on the iOS app and "Twi" and "Fante" are available. Tested on 7.4.2 (2657). Moving to signoff.

Interwiki links to akwiki are behaving strangely now. On https://meta.wikimedia.org/wiki/Meta:Administrators, it's displayed with the other links, but shows "ak:Wikipedia:Administrators" where the language name normally is. On https://incubator.wikimedia.org/wiki/Wp/sli/Wikipeedia:Administratoren, it's not recognised as an interwiki link and is displayed as an inline link at the end of the page instead.

Change 955007 merged by jenkins-bot:

[operations/mediawiki-config@master] Add Akan language

https://gerrit.wikimedia.org/r/955007

Mentioned in SAL (#wikimedia-operations) [2023-10-12T13:25:02Z] <kartik@deploy2002> Started scap: Backport for [[gerrit:955007|Add Akan language (T333765)]]

Mentioned in SAL (#wikimedia-operations) [2023-10-12T13:25:51Z] <kartik@deploy2002> kartik and srishakatux: Backport for [[gerrit:955007|Add Akan language (T333765)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-10-12T13:34:10Z] <kartik@deploy2002> Finished scap: Backport for [[gerrit:955007|Add Akan language (T333765)]] (duration: 09m 39s)

Limck620 removed Due Date which was set to Nov 8 2023, 4:00 PM.
Aklapper changed the task status from In Progress to Open.Apr 11 2025, 10:15 PM

Resetting task status from "In Progress" to "Open" as this task has been "in progress" for more than one and a half years (see T380300).

The categorisation on ak.wikipedia.org is also broken (e.g. https://ak.wikipedia.org/wiki/Category:Gaana and https://ak.wikipedia.org/wiki/Wikipedia:Administrators). Most links to pages not in the main namespace are broken as well, e,g, categories and templates on https://ak.wikipedia.org/wiki/Category:User_io-1, talk pages, user pages and user talk pages on https://ak.wikipedia.org/wiki/User_talk:Xibitgh. That includes links from other places too, e.g. the "This property is being used by" section on https://www.wikidata.org/wiki/Property_talk:P2002 and sitelinks on items.

CLDR uses ak rather than tw. Removing ak from Names.php has caused the CLDR data to be deleted from the CLDR extension (https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/cldr/+/a3c833c07959754aafe8e33665a9624ffd6564fe). MessagesTw.php never had ak as a fallback language, so it was never able to use the translations, but it definitely can't use them if they've been deleted.

And speaking of CLDR, I think people should also bear in mind that since CLDR uses ak, things that make use of CLDR (like browsers and code libraries) also do. Trying to remove all traces of ak instead of only removing the interface translations and adding it as a fallback language (like was done for no) makes it harder to integrate MediaWiki data/tools with non-MediaWiki data/tools.

For example, in Javascript, if I ask it to format a date in tw using this code:

const date = new Date(Date.UTC(2020, 11, 20));
const options = { weekday: "long", year: "numeric", month: "long", day: "numeric" };
console.log(new Intl.DateTimeFormat("tw", options).format(date));

it uses my browser's default language (German) and outputs Sonntag, 20. Dezember 2020.

If I include ak as a fallback:

const date = new Date(Date.UTC(2020, 11, 20));
const options = { weekday: "long", year: "numeric", month: "long", day: "numeric" };
console.log(new Intl.DateTimeFormat(["tw", "ak"], options).format(date));

it is able to use CLDR's data and outputs Kwesida, 2020 Mumu-Ɔpɛnimba 20.

Yeah, understand the complex issues that followed after Akan was abruptly removed a year ago. I think there was a lack of clarity around how things are to be done when it comes to removing a language code and which steps to follow in order, probably @Amire80 can say more. It is a bit more streamlined currently - see here for Kanuri T356144. And all the steps in place include adding fallback to have backward compatibility, and removing Wikidata items comes first before removing the code from core and other projects to avoid the challenges that were caused in removing the Akan language. After the steps are complete for Kanuri, hopefully Akan can be addressed too.

Change #1281964 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[operations/mediawiki-config@master] Add Akan (ak) to wmgExtraLanguageNames by default

https://gerrit.wikimedia.org/r/1281964

Change #1281964 merged by jenkins-bot:

[operations/mediawiki-config@master] Add Akan (ak) to wmgExtraLanguageNames by default

https://gerrit.wikimedia.org/r/1281964

Mentioned in SAL (#wikimedia-operations) [2026-05-05T13:15:02Z] <mszwarc@deploy1003> Started scap sync-world: Backport for [[gerrit:1270882|Remove temporary wgOAuth2UsePrefixedSub feature flag (T417690)]], [[gerrit:1271969|Move privileged global and local group handling to WikimediaCustomizations (T418507)]], [[gerrit:1281964|Add Akan (ak) to wmgExtraLanguageNames by default (T333765 T425256)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-05T13:16:45Z] <mszwarc@deploy1003> mszwarc, jhsoby, matmarex, d3r1ck01: Backport for [[gerrit:1270882|Remove temporary wgOAuth2UsePrefixedSub feature flag (T417690)]], [[gerrit:1271969|Move privileged global and local group handling to WikimediaCustomizations (T418507)]], [[gerrit:1281964|Add Akan (ak) to wmgExtraLanguageNames by default (T333765 T425256)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug

Mentioned in SAL (#wikimedia-operations) [2026-05-05T13:23:40Z] <mszwarc@deploy1003> Finished scap sync-world: Backport for [[gerrit:1270882|Remove temporary wgOAuth2UsePrefixedSub feature flag (T417690)]], [[gerrit:1271969|Move privileged global and local group handling to WikimediaCustomizations (T418507)]], [[gerrit:1281964|Add Akan (ak) to wmgExtraLanguageNames by default (T333765 T425256)]] (duration: 08m 37s)