2014-04-04

‎Localized subpages: new section

← Older revision

Revision as of 19:30, 4 April 2014

(One intermediate revision by one user not shown)

Line 695:

Line 695:

 

 

 

:::I don't think you should rely on the article names to have a specific length or character set on the wiki, also because localized titles may be allowed in the future. I would instead catch any exception when saving the file on the file system (or do a pre-check), and properly truncate the file name (maybe keeping the language tag?) and fix the links to it. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 00:26, 2 April 2014 (UTC)

 

:::I don't think you should rely on the article names to have a specific length or character set on the wiki, also because localized titles may be allowed in the future. I would instead catch any exception when saving the file on the file system (or do a pre-check), and properly truncate the file name (maybe keeping the language tag?) and fix the links to it. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 00:26, 2 April 2014 (UTC)

 

+

 

+

::::For now I'm converting the (localized) language suffix into a language code prefix (ASCII), which solves the most of it, the problem is only with the anomalies. Of course if localized titles are allowed or someone will want to use the script for another wiki, changes will be needed.

 

+

::::At the moment the "safe-mode" is needed only for packaging, and assuming the packager uses unicode locale, catching file system errors will not help. Also the file name should be based [[wikipedia:Purely functional|purely]] on the title.

 

+

::::I think I'll use some common hashing function for the non-ASCII titles (and leave the ASCII alone), the readability will be the same as for URL-encoded titles, with fixed length and probably also sufficiently collision-free. The only disadvantage is that titles containing a single unicode character will become unreadable, but I'll have to live with that.

 

+

::::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:17, 4 April 2014 (UTC)

 

+

 

+

=== Localized subpages ===

 

+

 

+

If {{Bug|39668}} is implemented, we should probably rethink the rule for localized subpages in [[Help:I18n#Article_titles]]. The problem is that with {{ic|Title/Sub-page (Language)}} the breadcrumb links below the title will point to the English page instead of the localized one. {{ic|Title (Language)/Sub-page}} makes more sense wrt file system hierarchy anyway, so I would do it anyway. Alternatively we may go the [[Help_talk:I18n#Language_namespace.28s.29_in_place_of_suffixes.3F|language namespaces]] way, which should also solve this problem. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:30, 4 April 2014 (UTC)

Show more