Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#18 | BookMadeSimple.pot | 3.32 KB | MarcElbichon |
#17 | BookMadeSimple.pot | 3.33 KB | MarcElbichon |
#11 | book_made_simple.module.txt | 15 KB | MarcElbichon |
#10 | book_made_simple.module.txt | 14.97 KB | MarcElbichon |
#8 | book_made_simple.module.txt | 14.67 KB | MarcElbichon |
Comments
Comment #1
MarcElbichon CreditAttribution: MarcElbichon commentedSorry, this is an Internalization issue.
Comment #2
Pepe Roni CreditAttribution: Pepe Roni commentedYes, 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?
Comment #3
MarcElbichon CreditAttribution: MarcElbichon commentedyes 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 ?
Comment #4
Pepe Roni CreditAttribution: Pepe Roni commentedAs 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.
Comment #5
MarcElbichon CreditAttribution: MarcElbichon commentedCan you test this version ?
Comment #6
Pepe Roni CreditAttribution: Pepe Roni commentedSorry, 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.
Comment #7
MarcElbichon CreditAttribution: MarcElbichon commentedCurious, 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 ?
Comment #8
MarcElbichon CreditAttribution: MarcElbichon commentedOops, i forgot to delete traces
Send you a new version
Comment #9
Pepe Roni CreditAttribution: Pepe Roni commentedSorry, 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?
Comment #10
MarcElbichon CreditAttribution: MarcElbichon commentedCan 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
Comment #11
MarcElbichon CreditAttribution: MarcElbichon commentedIf browser hangs up, try this version
Comment #12
Pepe Roni CreditAttribution: Pepe Roni commentedBoth versions work for me! Thanks.
Great work!
Now, whats about a new release 6.x-2.1 or 6.x-2.x-dev?
Comment #13
MarcElbichon CreditAttribution: MarcElbichon commentedHave 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
Comment #14
MarcElbichon CreditAttribution: MarcElbichon commentedI'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 !
Comment #15
Pepe Roni CreditAttribution: Pepe Roni commentedTo #13: Yes, it works!
Comment #16
Pepe Roni CreditAttribution: Pepe Roni commentedOf 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.
Comment #17
MarcElbichon CreditAttribution: MarcElbichon commentedHere's the .pot file
Comment #18
MarcElbichon CreditAttribution: MarcElbichon commentedSorry. I changed pot file. Here's the newest
Comment #19
MarcElbichon CreditAttribution: MarcElbichon commentedComment #20
scottrigby