Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make content-language-bounded messages display in user interface language #695

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

winstonsung
Copy link

Make content-language-bounded messages display in user interface language

This fix the issue that the system message "maps-geo-json-create-page-button", "maps-loading-map" cannot display in language variants ("page view language" aka "user language variant", see Manual:Language on MediaWiki.org )

Bug: #694

@winstonsung
Copy link
Author

CC @JeroenDeDauw

@codecov-commenter
Copy link

codecov-commenter commented May 14, 2022

Codecov Report

Merging #695 (1ea2ee4) into master (2d18ff1) will not change coverage.
The diff coverage is n/a.

❗ Current head 1ea2ee4 differs from pull request most recent head 053c0bc. Consider uploading reports for the commit 053c0bc to get more accurate results

@@            Coverage Diff            @@
##             master     #695   +/-   ##
=========================================
  Coverage     50.23%   50.23%           
  Complexity      840      840           
=========================================
  Files            77       77           
  Lines          2817     2817           
=========================================
  Hits           1415     1415           
  Misses         1402     1402           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d18ff1...053c0bc. Read the comment docs.

@JeroenDeDauw
Copy link
Member

I'm not sure this is correct. Especially maps-loading-map, which definitely ends up in the parser cache.

@Nikerabbit

@winstonsung
Copy link
Author

I was considering using "page view language" rather than just using "user interface language" in namespaces with wikitext content modal, but there's no "page language"-related variables passed in, causing the complexity to implement it.

@winstonsung
Copy link
Author

winstonsung commented May 14, 2022

It seems the CI already failed for "PHPUnit: MW master, PHP 8.1" before this commit?

3b585b3 Localisation updates from https://translatewiki.net.
https://github.com/ProfessionalWiki/Maps/runs/6404720045

@Nikerabbit
Copy link
Contributor

wfMessage is implicit global state. Ideal solution would be to pass the correct language somehow.

@JeroenDeDauw
Copy link
Member

wfMessage is implicit global state. Ideal solution would be to pass the correct language somehow.

Yes sure. But is the change in this PR correct or not?

It seems the CI already failed for "PHPUnit: MW master, PHP 8.1" before this commit?

Indeed, don't worry about that failure

@Nikerabbit
Copy link
Contributor

I can't tell because I am not familiar with the code. Most likely not though, if this is ending up in the parser cache without fragmenting it by language.

@winstonsung
Copy link
Author

I would prefer only by language variants, but I have no idea how to pass the current language variant based on page language.

@winstonsung winstonsung force-pushed the master branch 2 times, most recently from 8960b58 to 6a829a7 Compare August 1, 2022 06:44
…uage

This fix the issue that the system message "maps-geo-json-create-page-button", "maps-loading-map" cannot display in language variants ("page view language" aka "user language variant", see Manual:Language on MediaWiki.org )

Bug: ProfessionalWiki#694
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.

4 participants