More support for translation of book pages
druppi - May 28, 2009 - 16:11
| Project: | BookMadeSimple |
| Version: | 6.x-2.0 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
BookMadeSimple does everything that the native book module lacks of. I have posted an issue #475032: Add book parent when translating a book page to the book.module issue queue, but I don't think, this would be solved there. Perhaps you can solve it in BookMadeSimple?

#1
Sorry, this is an Internalization issue.
#2
Yes, you're right. But with that point of view, BMS at all is an issue of the book.module.
So why not extend BMS to support this, as the said issue is an issue with (translating) books?
#3
yes but translation is done by Internalization not by book module. I don't know Internalization module, but it seems it don't act well with page book.
What is exactly the problem ?
#4
As long as you are not comfortable with I18n (Internationalization, 18 characters between I and n) you won't be able to understand my problem, I see. I will post a receipt so that you can follow my steps until you run into the same problem. But give me some time for this, please.
[Edit:]
Now, here is the receipt:
What I lined out here, is what I think is the normal translation process: begin with the parent, then translate the child pages. And the translated child pages should stay connected within the translated book automatically.
#5
Can you test this version ?
#6
Sorry, does not work correctly. The book is set, but the parent item is not.
If you add &parent=nnn to the url (or similar in the links array), where nnn is the bid of the translated parent, it should work. If I do it manually, it at least works.
#7
Curious, this works for me.
I can't modify the url because it is managed by i18n and I can't capture it in BMS code.
Can you try with this version ?
#8
Oops, i forgot to delete traces
Send you a new version
#9
Sorry, no changes, even with fresh drupal installation (except for trace messages still there).
[Edit1]
Now had some time to analyze the problem a little bit more. If you omit the parent item in a child page, it is replaced by the book itself, thus in the end, it seems to work. But if you translate a page on any lower level (a page as a child of a page), always the book itself is set as parent item. You can always control it before saving in the book outline section.
Could you catch/overwrite the function translation_node_overview in translation.pages.inc on line 15? This function lacks to create &parent=nnn in the generated link for add translation. Don't know if Drupal searches for a function book_made_simple_node_overview, in that you can clone and improve the code?
#10
Can you test this new version ?
I add parent=nnn to url.
Default "add child" link and links added by BMS don't work when adding a child to translated page (non default language). Parent book is not set.
Is it a correct way ?
If yes, may i hide dropdown list box in translated pages ?
Prefix language wasn't set
#11
If browser hangs up, try this version
#12
Both versions work for me! Thanks.
Great work!
Now, whats about a new release 6.x-2.1 or 6.x-2.x-dev?
#13
Have you checked style list of links as described in your #474390: Add child page does not respect language url issue (#3)
The last version of this post contains also this feature.
When you'll confirm all is OK, i'll create a new release.
Thanks for your contribution
Marc
#14
I'm wondering if you could help me.
I'd like to create an handbook for BMS, but my english being so poor, i'm wondering if you could do this for me !
#15
To #13: Yes, it works!
#16
Of course, I really like to do that! I have already written a small howto: Simple image gallery with imagefield where I mentioned BMS.
We can exchange e-mail adresse via the contact form. Then we can collaborate on the handbook until we have a final version.
I am also willing to write the german translation of BMS if you send me the .pot file.
#17
Here's the .pot file
#18
Sorry. I changed pot file. Here's the newest
#19