getNamespaceBaseLanguage should be replaced with getPageLanguage
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Locate the implementation of getNamespaceBaseLanguage and the LocalSettings setup, then compare it with the linked upstream Translate commit using getPageLanguage. Verify the PageContentLanguage hook behavior for non-main namespaces and Translate message namespaces; done means the old helper is replaced without conflicting with Translate's hook.
Written by the indexing model from the issue text.
Description
Similar code exists in our Translate fork, but upstream now uses getPageLanguage, so it makes more sense to just set up a PageContentLanguage hook in our LocalSettings like so:
$wgHooks['PageContentLanguage'][] = function( Title $title, &$pageLang, $userLang ) {
global $wgLanguageCode;
$pageLang = Language::factory( $title->getNamespace() !== NS_MAIN ? $wgLanguageCode : 'ja' );
}
Should probably not run this hook when Translate's own hook is activated (in_array( $namespace, $wgTranslateMessageNamespaces );)
- Dominant language
- PHP
- Stars
- 7
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from thpatch/TouhouPatchCenter
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
thpatch/TouhouPatchCenter#6 · 2 comments ·
All issues in thpatch/TouhouPatchCenter
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100