SemanticMediaWiki / SemanticCite

Allows to manage citation resources using semantic annotations
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Cite
Other
24 stars 13 forks source link

Remove double underscores from smw-pa-property-predefined__* #58

Open Nikerabbit opened 6 years ago

Nikerabbit commented 6 years ago

Please remove the double underscores in messages such as smw-pa-property-predefined__sci_cite_key. These are not supported by MediaWiki and cannot be customised in MediaWiki namespace. They also cause issues at translatewiki.net: https://phabricator.wikimedia.org/T181981

mwjames commented 6 years ago

smw-pa-property-predefined__sci_cite_key. These are not supported by MediaWiki and cannot be customised in MediaWiki namespace. They also cause

As you might imagine (from the key context) those are related to predefined properties and the key is responsible for generating a text [0, 1] on a property page. This has been a convention key at least since 2.0 [2] meaning for the last 3+ years.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/PropertySpecificationLookup.php#L380-L387 [1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/ce42dce6dfc27bee8bb6b3c95d35e500fef4b1a2/src/PropertySpecificationReqMsgBuilder.php#L208-L241 [2] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/2.0.x/includes/articlepages/SMW_PropertyPage.php

On 12/5/17, Niklas Laxström notifications@github.com wrote:

Please remove the double underscores in messages such as smw-pa-property-predefined__sci_cite_key. These are not supported by MediaWiki and cannot be customised in MediaWiki namespace. They also cause issues at translatewiki.net: https://phabricator.wikimedia.org/T181981

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/SemanticMediaWiki/SemanticCite/issues/58

Nikerabbit commented 6 years ago

I can drop these keys on translatewiki.net config so that they won't cause issues, but then they cannot be translated anymore :(

mwjames commented 6 years ago

I can drop these keys on translatewiki.net config so that they won't cause issues, but then they cannot be translated anymore :(

Surely that defies the idea of having those keys in the first place, doesn't it!

What about converting smw-pa-property-predefined__sci_cite_key to something like smw-pa-property-predefined--sci-cite-key does this work, or does this create other issues?

In case the above is a reasonable middle ground then SMW-core needs to be changed on the cited sources with something like ... str_replace( '_', '-', strtolower( $key ) ) and all i18n keys pertaining smw-pa-property-predefined are required to be modified.

Now that we change the overall matching, change smw-pa-property-predefined to smw-property-predefined (as convention key).

Mentioned changes are not backwards compatible and therefore would require SMW 3.0 for all SMW hosted repositories!

@kghbln Any input?

On 12/5/17, Niklas Laxström notifications@github.com wrote:

I can drop these keys on translatewiki.net config so that they won't cause issues, but then they cannot be translated anymore :(

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/SemanticMediaWiki/SemanticCite/issues/58#issuecomment-349038072

Nikerabbit commented 6 years ago

-- is okay in MediaWiki.

kghbln commented 6 years ago

Mentioned changes are not backwards compatible and therefore would require SMW 3.0 for all SMW hosted repositories!

The current system has worked for some time now but it was probably only a matter of time until something like what was reported here happened.

However, since we are breaking many other things with SMW 3.0.0 anyways it appears to be a good point in time to make these backwards incompatible changes. I believe that all extensions providing special properties are affected, i.e. SBL, SESP and SIL. These should see major version changes in the event of the fix to avoid compat issues for system adminiatrators. @mwjames Sould I open individual issues for these? I guess this will be good.

@Nikerabbit Thanks for confirming that -- is fine.

On the event of changing the message keys it will be nice if the respective messages and their existing translations can also be moved on twn at the same time. We have already lost translations on "regular" message key changes lately and here it will be a shame if this happens here too.

Nikerabbit commented 6 years ago

We have already lost translations on "regular" message key changes lately and here it will be a shame if this happens here too.

Renames are still handled manually, so it is possible that I have missed some. Best to leave me a note if you are doing rename so that I am aware. Old renames can still be performed if you know specific keys.

ChristianWia commented 6 years ago

translatewiki behaviour seems ok now. Christian (Wladek92).

kghbln commented 6 years ago

Best to leave me a note if you are doing rename so that I am aware.

Will do.

translatewiki behaviour seems ok now.

Good to hear, however this still an open window to put this on more solid ground.

mwjames commented 6 years ago

These should see major version changes in the event of the fix to avoid compat issues for system adminiatrators.

No need for a major (i.e. 1.x.x to 2.x.x) because for SMW 2.5.x we don't backport any messages which means the key still fits and for 3.x those that match a key will display a description and for those who don't a standard message will be displayed until the user updates to a more recent version.

@mwjames Sould I open individual issues for these? I guess this will be good.

Probably the best.

kghbln commented 6 years ago

No need for a major

Ah, ok, I thought the changes might be more dramatic. However we should do a minor release as soon as SMW 3.0.0 is out.

Probably the best.

Will do.

kghbln commented 6 years ago

I have created the issues an believe to have covered all extensions using the same logic.

kghbln commented 6 years ago

Also noted https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1365