Page MenuHomePhabricator

The items in the 'ipboptions' message should be localizable
Closed, ResolvedPublic

Description

Author: avarab

Description:
The items defined in $wgBlockExpiryOptions should be localizable like other
strings, they're currently hardcoded in SpecialBlockip.php. Perhaps something
like this could be used:

<option value="1 Day">1. Tag</option>


Version: 1.5.x
Severity: normal

Details

Reference
bz1651

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:14 PM
bzimport set Reference to bz1651.

The values are gathered from $wgBlockExpiryOption and later
passed to strtotime(). According to the PHP documentation,
the function only accept english text.

We could change the form and let the user choose a date
instead. Eventually we can have a javascript that reuse
the $wgBlockExpiryOption value so a user can fastly set
the date.

Then the function will grab the posted date, convert it
to a timestamp and insert that in the database.

zigger wrote:

After 1.5beta1, $wgBlockExpiryOptions was removed. The 'ipboptions' message is
now used.

zigger wrote:

*** Bug 2694 has been marked as a duplicate of this bug. ***

river wrote:

it is now possible to translate these via MediaWiki:Ipboptions. specify a
comma-separated list of "local:english,local:english,..." strings.

(In reply to comment #4)

it is now possible to translate these via MediaWiki:Ipboptions. specify a
comma-separated list of "local:english,local:english,..." strings.

They work fine, but the "other" option cannot be translated (or it does not work), because the
option value (not only its interface presentation) is localized in some places.

Created attachment 726
A simple fix for the issue with "other" expiry time

The attached patch might solve the problem (untested).

Attached:

The requested functionality seems to be working now fine. Closing bug.

Diffusion added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:23 AM