Last modified: 2009-08-01 19:03:59 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 T14922, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12922 - Smw_import_ doesn't work with canonical namespace names
Smw_import_ doesn't work with canonical namespace names
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Markus Krötzsch
http://wikis2.pruebas.madrimasd.org:8...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-05 14:30 UTC by S Page
Modified: 2009-08-01 19:03 UTC (History)
0 users

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


Attachments

Description S Page 2008-02-05 14:30:49 UTC
In "[Semediawiki-user] problem foaf import in Es-MW" e-mail, user David reports that MediaWiki:Smw_import_foaf doesn't work when used on a Spanish wiki, e.g. in the page Atributo:Nombre.

The error I currently see is 'smw_wrong_importtype'.  What I think is happening is SMW_Factbox.php lines 147-156 only test the 
namespace from the element's line in MediaWiki:Smw_import_Xxxx page against the translated namespace names.  So a Spanish site won't work with 
  name|Type:String
because "Type" does not match the translated wgContLang->getNsText(SMW_NS_TYPE).

If I'm right, the workaround is to use translated names in the MediaWiki:Smw_import_Xxxx page, e.g. 
  name|Tipos de datos:String

The fix is to change those lines in SMW_Factbox.php to work with namespace IDs, something like:
  $elem_ns_index = wgContLang->getNsIndex($namespace)
  switch ($elem_ns_index) {
    case SMW_NS_TYPE:
      $elemtype = ...
    case SMW_NS_PROPERTY
      ...
    etc.

This should be faster code, too ;-)
Comment 1 Markus Krötzsch 2009-08-01 19:03:59 UTC
Various changes have happened to the import code since this bug was filed. Currently, the type of the imported elements is not actually checked any more, which is not really a good solution either. Based on the observation that there are usually only few imported vocabulary terms in any wiki, I would like to have a redesigned import mechanism that allows for "vocabulary extensions" that provide their own predefined page names to which they are mapped as soon as the extension is enabled. This would be a future project, however ... interested contributors should contact me.

I close this bug now as "INVALID" (which it has become over time -- shame on us ;-). 

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


Navigation
Links