Last modified: 2007-02-18 19:11:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10846, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8846 - Patch fixing hardcoded links in interface messages
Patch fixing hardcoded links in interface messages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-01 11:23 UTC by Daniel Arnold
Modified: 2007-02-18 19:11 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch fixing hardcoded links in interface messages (3.13 KB, patch)
2007-02-01 11:28 UTC, Daniel Arnold
Details
same patch as above but with "svn diff" instad of plain "diff" (5.24 KB, patch)
2007-02-01 12:11 UTC, Daniel Arnold
Details
improved version that now lists all url definitions (5.45 KB, patch)
2007-02-01 16:46 UTC, Daniel Arnold
Details
same patch as patch2 but without the url table on inital main page (3.13 KB, patch)
2007-02-02 12:36 UTC, Daniel Arnold
Details
link corection patch for MessagesXX.php from A-C (114.27 KB, patch)
2007-02-05 11:02 UTC, Daniel Arnold
Details
same patch as above for A-C but usage of {{ns: only in places where needed (101.68 KB, patch)
2007-02-05 18:51 UTC, Daniel Arnold
Details
Same patch as above for F to H (71.33 KB, patch)
2007-02-18 17:55 UTC, Daniel Arnold
Details

Description Daniel Arnold 2007-02-01 11:23:11 UTC
MediaWiki interface messages contain hardcorded links into the project namespace (the pages don't exist by default).

Thus:

1)
I have replaced every call of "Project:PAGENAME" in messages with a template call of the page that defines the link 
targets.

2)
I have added to the after-installation-mainpage a list of pages not existing in vanilla MediaWiki which interface 
definition files (in any language) expect to exist though. So people have a quick overview in ne place which pages they 
need to customize in order to avoid broken links in the interface.

I have started with the MessagesEn.php. If the patch gets applied step 1) should be applied to all 151 MessageXX.php files 
as this problem causes quite some trouble in multilingual wikis and as the fix can be done in a search and replace manner 
which doesn't change any real text (and thus you don't need to know the language of the language file you are fixing).

See this thread: http://lists.wikimedia.org/pipermail/wikitech-l/2007-January/029298.html for details, especially this 
mail http://lists.wikimedia.org/pipermail/wikitech-l/2007-January/029326.html outlines the problem for multilingual wikis.
Comment 1 Daniel Arnold 2007-02-01 11:28:20 UTC
Created attachment 3164 [details]
Patch fixing hardcoded links in interface messages

patch for above described bug
Comment 2 Daniel Arnold 2007-02-01 12:11:40 UTC
Created attachment 3165 [details]
same patch as above but with "svn diff" instad of plain "diff"

thanks to Raymond for pointing out the format issue and helping me with the
patch ;-)
Comment 3 Daniel Arnold 2007-02-01 16:46:18 UTC
Created attachment 3166 [details]
improved version that now lists all url definitions

Bug #6038 does cover a very similar topic. Especially the attached file there
does list all static urls. I checked all urls listed there against the current
version of MessagesEn.php and found three url definitions I did forget to add
to the table on the initial main page.

I now have checked all internal links. However the external links listed at Bug
#6038 still need some kind of treatment. As this is different from the internal
links I left it for the time being.
Comment 4 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-02-01 17:50:30 UTC
Tim has had performance concerns in the past with using curly-brace syntax in too many messages.  I 
for one am not going to commit until this gets run by him.
Comment 5 Daniel Arnold 2007-02-01 17:53:23 UTC
Pardon? This does not introduce new "curly-brace syntax". If you look you will see that the number has been exactly 
the same.
Comment 6 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-02-01 17:55:43 UTC
Sorry, my bad, you're correct.
Comment 7 Daniel Arnold 2007-02-02 12:36:37 UTC
Created attachment 3171 [details]
same patch as patch2 but without the url table on inital main page

If you don't like the table on intitial main page apply this patch to
mediawiki-svn
Comment 8 Leon Weber 2007-02-02 16:06:19 UTC
Patch applied in r19724. If noone stabs you, please reopen and attach the patch
for the remaining files :-P
Comment 9 Daniel Arnold 2007-02-05 11:02:48 UTC
Created attachment 3183 [details]
link corection patch for MessagesXX.php from A-C

This patch contains the first follow up to the above patch applied to SVN. At
contains the fixes for the message files starting from A including C, excluding
MessagesAr.php (will follow later) and inclduing further fixes for
MessagesEn.php.

The fixes include replacement of hardcoded project namespace links, replaced
hardcoded localised namespace names, replaced local wiki markup. The
Messages.En.php namespace calls were replaced by {{ns: in order to indicate to
translators that they shouldn't translate these in messages (very common
mistake).
Comment 10 Daniel Arnold 2007-02-05 11:05:49 UTC
P.S.: All links wich I as unable to resolve are marked with a comment and are subject to later retranslation from the 
english message file by the translators of these files.
Comment 11 Daniel Arnold 2007-02-05 18:51:46 UTC
Created attachment 3187 [details]
same patch as above for A-C but usage of {{ns: only in places where needed

As well some other small fixes
Comment 12 Daniel Arnold 2007-02-06 00:23:23 UTC
Leon applied the last patch to SVN today.
Comment 13 uv.wiki 2007-02-16 00:45:22 UTC
I submitted a patch for the Latin localization (la) that hopefully 
addresses all the concerns raised here: bug8998
Comment 14 Daniel Arnold 2007-02-18 17:55:12 UTC
Created attachment 3240 [details]
Same patch as above for F to H

This bug fixes (or highlights in case I was not able fixing it due to language
problems) the above mentioned link problems for message files from F to H,
leaving MessagesFa.php and MessagesHe.php out for the time being (RTL languages
will follow later otherwise I will get crazy ;).
Comment 15 Leon Weber 2007-02-18 19:05:32 UTC
Applied in SVN trunk, r19985.
Comment 16 Leon Weber 2007-02-18 19:11:27 UTC
(In reply to comment #12)
> Leon applied the last patch to SVN today.

For reference: it's r19794.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links