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
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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
-
product / databases
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
VilnaCRM-Org/user-service#525 ·
Maintainers usually reply within 21 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
shukiv/jabali-panel#2029 ·
Maintainers usually reply within 1 day
-
area:pool-types good first issue priority:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
crazy-goat/php-fpm-ng#822 ·
Maintainers usually reply within 1 day
-
agentic bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MagnaCapax/PMSS#1023 · 1 comment ·
Maintainers usually reply within 5 days