Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#451 2007-11-16 14:10:55

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hi. I haven’t applied the update in a client’s site. Although the site doesn’t have any issue related to MLP, I would like to install this new version.

Please, could you tell me the steps to apply this update?
Any file to modify? (I think that I’ve changed a file according a post by ruud so the MLP could work with TxP 4.0.5)
Or is it just about installing the base64 plug-in?

Thanks!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#452 2007-11-16 15:52:35

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

maniqui wrote:

Please, could you tell me the steps to apply this update? Any file to modify? (I think that I’ve changed a file according a post by ruud so the MLP could work with TxP 4.0.5) Or is it just about installing the base64 plug-in?

For upgrades / patches of existing installations here’s what to do…

  1. Backup your textpattern/lib directory just in case.
  2. Install all of the files from the zip’s /textpattern/lib folder. (Edited: Looking at the txplib_db.php code change from Txp4.0.4 to 4.0.5 shouldn’t effect the pack at all. However, if you want to keep your edit then don’t use the file in the zip, just stick with your existing one.)
  3. Install the l10n plugin from the zip’s /plugins folder and enable it.

Your site should now work on php4 or php5 / TxP 4.0.4 or 4.0.5.

Last edited by net-carver (2007-12-21 16:48:48)


Steve

Offline

#453 2007-11-16 16:01:52

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote:

Sweeeeeet, nice one Steve, glad to see you back and firing on all cylinders… and then some!

Thanks Stef, I see you have been busy yourself!

Looks good on my development site with 12 languages installed, even though our hoster has not upgraded MySQL to 4.1 despite their promise back in March. I’ll get onto them again. In the meantime I’ll bear in mind that MLP may well collapse; though it seems to be holding up impeccably so far.

Yeah, if it installed fine for you in the first place then this update will be easy. If you were to try a fresh install of the pack on that host then it would say “sorry-no-can-do” during the setup wizard.

One thing I spotted and don’t remember seeing before is a weird javascript error that Firebug throws at me on the MLP->Snippets->Search tab. It may well be MySQL related, but in case it isn’t here’s some info about it …

Will write more on this in a later post (if I don’t forget) as I’ll need to look into it myself. But it won’t be a high priority action for me if things appear fine for you.

Test environment
Linux: (no idea the version, it doesn’t say on the control panel) / Apache 1.3.36 / MySQL 4.0.27-standard-log / PHP 4.4.4 / Txp 4.0.5 / Firefox WinXP

Was that from your host’s control panel or the site’s admin > diagnostics tab? If you can glean the os kernel version and post that I’ll add your line to my previous table.

Many thanks.


Steve

Offline

#454 2007-11-16 16:31:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

… weird javascript error… won’t be a high priority action for me if things appear fine for you.

Yeah, it’s no biggie. As I say, seems to work in spite of the error.

Was that from your host’s control panel or the site’s admin > diagnostics tab?

Aha! It was from the control panel. The admin->Diagnostics claims:

Linux 2.4.21-52.ELsmp

and

Apache version: Apache/1.3.36 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.27 OpenSSL/0.9.7a

Probably too much information, but it’s there if you need it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#455 2007-11-16 16:50:15

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

bloke

Your report has been added to the table in this post.


Steve

Offline

#456 2007-11-17 14:39:42

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

All

just bookmarking a page for recording MLP stuff I don’t plan doing.


Steve

Offline

#457 2007-11-19 18:49:26

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: MLP - The Multi-Lingual Publishing Pack

I have just encountered the following problem after the upgrade to the latest pack (site running on TXP 4.0.5, PHP 5): when I clone an article, and work on the new rendition, the url of the new rendition will be changed to reflect the newly translated article. E.g.: I have an article in Hungarian entitled “utca”, I clone it, translate it into English, “street”, and lo, the url of this latter changes to “street”. The problem is that when one goes to http://site.url/hu/section/utca and clicks on the language switch, it points to http://site.url/en/section/street instead of http://site.url/en/section/utca. And obviously it directs the visitor to error 404… can somebody help me on this, please? Thank you very much in advance!

Offline

#458 2007-11-20 06:50:51

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

zoltandragon wrote:

I have just encountered the following problem after the upgrade to the latest pack (site running on TXP 4.0.5, PHP 5): when I clone an article, and work on the new rendition, the url of the new rendition will be changed to reflect the newly translated article. E.g.: I have an article in Hungarian entitled “utca”, I clone it, translate it into English, “street”, and lo, the url of this latter changes to “street”.

I think this is Txp 4.05, not the MLP pack.

Even in a normal Txp 4.05 installation (no MLP), the url-only title is updated whenever you edit the title of an article — as long as the article hasn’t been published with ‘live’ status. If I create a new draft article in Txp4.05; edit the title; then save/publish — I can see the url-only title keeps changing until I set its status to ‘live’. After that, the url title doesn’t track changes to the article’s title.

As the MLP Pack clones renditions into ‘draft’ status then the url-only title will change as you translate your rendition’s title until you published it with ‘live’ status, then the changes to the url should stop. For myself, this is what I would expect to happen.

If you want to set the url back to ‘utca’, just edit your rendition, look for the ‘url-only-title’ in the advanced options and set it to ‘utca’, publish and all should be well. It shouldn’t change any more.

The problem is that when one goes to http://site.url/hu/section/utca and clicks on the language switch, it points to http://site.url/en/section/street instead of http://site.url/en/section/utca.

Yes, I would expect that to happen as the links are generated from the url-only titles that were set as you edited the renditions.

However, it sounds like you are expecting the urls to be constant across renditions. If you want the url for the English rendition to include the word ‘utca’ then you will either need to edit the ‘url-only’ title (as above) or translate the body/excpert/fields first. When you are happy, set status to live and publish (thus setting the title to ‘utca’) then go in and finally translate the rendition’s title.

Phew, hope that makes sense.

And obviously it directs the visitor to error 404… can somebody help me on this, please? Thank you very much in advance!

That’s not obvious to me and it certainly shouldn’t be giving a 404 error. I’m looking into this now.

Can you show me you form/page where you have included the l10n_lang_list tag please?


Steve

Offline

#459 2007-11-20 08:02:35

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

That’s not obvious to me and it certainly shouldn’t be giving a 404 error. I’m looking into this now.

Ok, I created an Español article titled ‘Casa’ and published it in my blog section. It was automatically given a url-only title of ‘casa’.
I then cloned it to English, changed the body a little, translated the title to ‘House’ and published it live. It was given the url-only title ‘house’

I then visited my Español blog section and could see the Casa rendition in the blog section’s article list. Clicking on its title took me to the es/blog/casa rendition. There I could see the link to the English rendition of the article. Hitting this produced no errors — it took me straight to the en/blog/house rendition.

This was on a Txp4.05 / php 5.2.3 install using a section/title clean url mode with English, Ελληνικά, 日本語 and Español installed.

The language list, for that article, is correctly producing…

<ul class="l10n_lang_list">
	<li class="en-gb"><a href="http://mlp405.local/en/blog/house"><span dir="ltr">English (GB)</span></a></li>
	<li class="es-es l10n_current"><span dir="ltr">Español</span></li>
</ul>

… on the Spanish rendition and …

<ul class="l10n_lang_list">
	<li class="en-gb l10n_current"><span dir="ltr">English (GB)</span></li>
	<li class="es-es"><a href="http://mlp405.local/es/blog/casa"><span dir="ltr">Español</span></a></li>
</ul>

… on the English one.

Last edited by net-carver (2007-11-21 14:36:47)


Steve

Offline

#460 2007-11-20 18:52:13

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

All

Just posted an update (l10n.0.7.631.txt) to the l10n plugin to the MLP pack’s page (not the whole pack) that extends the l10n_lang_list tag so that it can output good language switching lists in category list pages.

As far as I can tell, this is different to zoltandragon’s problem above.


Steve

Offline

#461 2007-11-20 19:22:59

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: MLP - The Multi-Lingual Publishing Pack

Steve, thanks for your suggestions and for being such a help – I’ll think about it and experiment a little to see how it works.

Offline

#462 2007-11-22 17:23:02

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

All

just to update you. Here’s the current state of my development build…

Problem Comments Status / Changes
Incorrect url’s output by l10n_lang_list links for both category and author article lists. These caused 404 errors. This was reported here a long, long, time ago by guiguibonbon Fixed — added needed translation to the URL ‘author’ and ‘category’ fields.
Un-needed ‘1’ in the reported list of needed privileges by the setup wizard. Only seen if your DB user doesn’t have privileges needed to install and run the pack. Fixed by writing a custom routine to handle MySQL privilege reporting and override.
No way to bypass setup wizard privilege checks Sometimes occurs when setup wizard cannot correctly detect privileges — leaving user blocked from installing the pack. Fixed by writing a custom routine. This now allows you to re-test privileges (optionally with additional output) or totally skip the privilege checks and continue with the setup wizard.
Installation fails to insert l10n_lang_list tag into Txp4.0.5’s default forms Txp 4.0.4 is fine. Fixed. Updated the setup routine to correctly detect 4.0.5’s default forms.
Edit HTML Character Encodings being dropped by the snippet editor Exiladler posted about this. It was leading to xhtml validation failures Fixed
Admin language switcher: doesn’t work on Txp4’s development version Txp 4.0.4 and 4.0.5 are fine, Crockery untested as yet Edit Fixed — added insert points for dev/4 branch
Edit Admin language switcher: may not work with admin tab area mods If you use a modified txplib_head.php file as part of a mod for the admin interface you’ll probably loose the admin-side quick language picker. Fixed — will now insert at the foot of the page too. Works in 4.0.4/4.0.5 and 4/Dev branch
Edit Admin language switcher: language list order jumps around. Fixed — list is now sorted

…grab it from the txp-plugins download page

Last edited by net-carver (2008-01-07 05:29:21)


Steve

Offline

#463 2007-11-22 17:42:14

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: MLP - The Multi-Lingual Publishing Pack

Great to know what is happening behind the curtains!
Steve, it seems you have been charging your batteries and now you’re full of energy (Kraftwerk dixit).

What about the feature I asked? ;)

To have the option to localize section names. I think this ability can improve both human readability (specially for those that don’t understand the main language) and SEO.
So, you can have urls like:

/services/my-services
/servicios/mis-servicios

/about/
/acerca-de/

Do you think it’s possible?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#464 2007-11-22 18:26:22

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

maniqui wrote:

What about the feature I asked? ;)
To have the option to localize section names. I think this ability can improve both human readability (specially for those that don’t understand the main language) and SEO.

I partly agree with this, so long as the output URL is transliterated.

For sites using languages with character sets matching the unreserved URI character set then yes, this could lead to more readable URLs. For other characters, the URI requires the use of percent encoding. (See the Wikipedia percent encoding page for more details.)

A site visitor’s experience of such URLs can vary depending on how the browser presents the URI string to the user — either encoded or unencoded.

One way to prevent the need for percent encoding is to dumb-down or transliterate the strings used in URLs — and this is the approach taken with URL-only titles used by Textpattern articles.

However, in the case of category and author lists, Textpattern doesn’t dumb-down the URL but does use percent encoding. This might significantly worsen the URL from a human readability point of view (unless presented un-encoded) but you wouldn’t ever want anyone to read one over the telephone for you to type in!!!

Here’s an example of what I’m talking about: This is how FF presents the URL of a Greek category link to me as I mouse-over it…

And this is what appears in the URI box when I click the link… http://mlp405.local/el/%CE%9A%CE%B1%CF%84%CE%B7%CE%B3%CE%BF%CF%81%CE%AF%CE%B1/Possibly-Junk

So, you can have urls like:
/services/my-services
/servicios/mis-servicios
/about/
/acerca-de/
Do you think it’s possible?

I think that, subject to either dumbing down or percent encoding, generating language specific URLs will be possible. I’m already doing URL re-writes so going a step further should be possible, especially if Graeme re-surfaces.

However, the problem might come with how Txp processes those URLs and if the MLP Pack can transform them back into something it’s expecting, before Txp actually gets to processes it.

It’s that part I don’t know about yet. Edit Yes, it should be possible as the pack already intercepts the URL and strips the language marker from it.

Last edited by net-carver (2007-11-23 02:12:56)


Steve

Offline

#465 2007-11-22 18:39:10

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

Maniqui

Just a thought: could you use a different permenant link mode — one that doesn’t bother including the section at all (like title-only, date/title or id/title?) Then your URL wouldn’t face a section translation challenge.

Goodnight.


Steve

Offline

Board footer

Powered by FluxBB