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

Markup in i18n files. #5

Open
7 tasks
Ascor8522 opened this issue Aug 16, 2020 · 1 comment
Open
7 tasks

Markup in i18n files. #5

Ascor8522 opened this issue Aug 16, 2020 · 1 comment
Labels
i18n i18n-related issues and Pull Requests

Comments

@Ascor8522
Copy link
Contributor

Ascor8522 commented Aug 16, 2020

I believe Mediawiki and HTML markups should be left out of the internationalization files and hard-coded in the PHP files.

It could avoid errors while translating the strings and avoid repeating the same markup on multiple files.

Lines that would need to be changed:

"scratchlogin-instructions": "'''Note: You must already have an account on this wiki to log in with Scratch!'''<br/>Please comment the following verification code on the $1user verification project$2:<br/>'''$3'''<br/><small>(If necessary, you can [[Special:ScratchLogin/reset|reset your verification code]].)</small>",

"scratchlogin-unregistered": "The user '''$1''' is not registered on this wiki.",

"scratchlogin-success": "Success! You will be logged in as '''$1''' on the next page you visit.",

"scratchlogin-code-reset": "Your verification code has been reset.<br/>Return to [[$1]].",

"scratchlogin-userlogin-link": "<p class=\"mw-ui-vform\" style=\"text-align: center;\">[[Special:ScratchLogin|Log in with Scratch]]</p>",

"scratchpasswordreset-instructions": "Comment the following verification code on the $1user verification project$2 to be displayed a temporary password to log in with:<br/>'''$3'''<br/><small>(If necessary, you can [[Special:ScratchPasswordReset/reset|reset your verification code]].)</small>",

"scratchpasswordreset-success": "Your temporary password is '''<code>$1</code>'''. Please [[Special:UserLogin/$2|log in]] and change it as soon as possible.",

Also, keep in mind translating long strings isn't very user friendly, and it would be much more enjoyable to translate more smaller strings.


Checklist added by @Kenny2github:

  • Split up scratchlogin-instructions
  • Gender scratchlogin-unregistered
  • Gender scratchlogin-success
  • Use MediaWiki string for "return to page" if it exists and shorten scratchlogin-code-reset
  • Hardcode styling for scratchlogin-userlogin-link
  • Split up scratchpasswordreset-instructions
  • Find a better way to introduce the user verification project than $1user verification project$2
@Kenny2github Kenny2github added the i18n i18n-related issues and Pull Requests label Aug 16, 2020
@Kenny2github
Copy link
Member

  • I agree that scratchlogin-instructions should be split up. I will do this at some point.
  • scratchlogin-unregistered is fine as it is. It's within limits of reasonable markup. However, it occurs to me that that string may need gendering. Will change that.
  • Likewise for scratchlogin-success.
  • I'm sure there's a MediaWiki built in string for "return to [[page]]", I just couldn't be bothered to find it when writing the extension. scratchlogin-code-reset will be shortened.
  • scratchlogin-userlogin-link is not within limits for reasonable markup. That styling really should be hardcoded. In this case the link also can be. Will change.
  • scratchpasswordreset-instructions should also be split up. Also, the $1user verification project$2 thing was a hack at the time. This extension is very new. Will change.
  • scratchpasswordreset-success is within reasonable markup limits. No changes required for this.

If you don't mind, I will update your OP to reflect this as a checklist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n i18n-related issues and Pull Requests
Projects
None yet
Development

No branches or pull requests

2 participants