Support for i18n extensions

druppi - September 9, 2008 - 05:29
Project:About This Node
Version:6.x-1.0-rc3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Would it be possible to add support for extensions for example of i18n? I18n adds a tnid to the node (the nid of the node that has been translated).

Another option would be a configuration page to select which attributes of a node should be displayed (by role?)

#1

Todd Nienkerk - September 12, 2008 - 13:55
Component:Miscellaneous» Code

@druppi: To address the first issue, I can certainly try, but I'm totally unfamiliar with i18n. Can you give me an example of how this data is stored in the node object?

Your second request is totally unrelated to the issue at hand and should be submitted as a separate feature request. However, please keep in mind that this module is intended as an administrative utility to allow those with permission to view the "About This Node" block a quick reference as to the status of a node. In my opinion, changing the output of this block based on role adds unnecessary complication to what should be a narrowly focused module.

Please feel free, though, to post a feature request. If there's a demand for it, I'll certainly supply it.

#2

Todd Nienkerk - September 12, 2008 - 14:31

I've played around with i18n a bit, and here's what I think is going on:

  • If tnid for a node = 0, it's neither a translated node nor a translation.
  • If tnid for a node = its own nid, it's the source of a translation.
  • If tnid for a node = neither 0 nor its own nid, it's a translated node. In this case, tnid is the nid of the original node.

Sound about right?

#3

druppi - November 4, 2008 - 14:09

You're right. And tnid is not an i18n-extension but an extension(?) of the locale module, thus within core!

#4

stratosgear - September 20, 2009 - 19:19
Status:active» needs review

I've added i18n support.

It adds a "Translation status" item. It lists the titles of all translated nodes (linking to the node itself), and it encloses the source translation language in square brackets.

Something like:

# Translation status:
Greek: The Greek node title
[English]: The English node title

#5

stratosgear - September 21, 2009 - 20:07

Doh,

I forgot to attach the patch file. Sorry...

AttachmentSize
patch.txt 1.26 KB
 
 

Drupal is a registered trademark of Dries Buytaert.