https://bugzilla.wikimedia.org/show_bug.cgi?id=29418

       Web browser: ---
             Bug #: 29418
           Summary: Name of type "Geographic coordinate" is not localized.
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Maps
        AssignedTo: jeroen_ded...@yahoo.com
        ReportedBy: van.de.bug...@gmail.com
    Classification: Unclassified


Created attachment 8666
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=8666
The fix.

I am running a server with:

MediaWiki 1.16.5
Maps 0.7.6.1
Semantic MediaWiki 1.5.6
Semantic Maps 0.7.6.1

Default language is Russian ($wgLanguageCode = "ru";). Name of type "Geographic
coordinate" is NOT localized, it is still displayed in English language,
regardless of the file
extensions/SemanticMediaWiki/languages/SMW_LanguageRu.php:

protected $m_DatatypeLabels = array(
   ...
   '_geo' => 'Географическая координата', // name of the geocoord type
   ...

I found the cause of this bug. It is
extensions/SemanticMaps/includes/SM_GeoCoordsValue.php file:

public static function initGeoCoordsType() {
    SMWDataValueFactory::registerDatatype( '_geo', __CLASS__, 'Geographic
coordinate' );
    return true;
}

If I remove hardcoded type name:

public static function initGeoCoordsType() {
    SMWDataValueFactory::registerDatatype( '_geo', __CLASS__ );
    return true;
}

it will be properly localized depending on language. See attached patch.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to