Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#136 2007-03-05 14:06:22

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

Re: MLP - The Multi-Lingual Publishing Pack

Is there a cunning way to insert variables into a snippet? e.g. my snippet might be called ##ed_209## and in English it would be defined as:

“Lay down your weapon, you have {num} seconds to comply!”

When ED-209 gets an upgrade he may become more lenient and give 30 seconds instead of the customary 20. With many languages installed, using variables like this means I’d have less updating to do. Any ideas on ways to achieve this? Have I missed it in the docs?

Splitting the snippet into two and calling: ##ed_209_a## 30 ##ed_209_b## would work, but it gets kinda messy very quickly.


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

#137 2007-03-05 16:15:58

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

Re: MLP - The Multi-Lingual Publishing Pack

FireFusion wrote:

Any idea how we should try to fix this yet?

Sorry, none at the moment. On the face of it that looks like a php error and I haven’t seen the likes of it before.

Bloke

Will have to reflect on your posts before replying properly — but as a quick reply, if you are generating the content via your own php then you can certainly do it using the Txp standard gTxt() function that takes an array of key->value mappings.

Something like echo gTxt( 'ed_209' , array( '{num}' => '30' ) );.


Steve

Offline

#138 2007-03-05 16:17:06

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

Re: MLP - The Multi-Lingual Publishing Pack

All

will be away for a few days, doubt I’ll be able to post again until Thursday 8th March.


Steve

Offline

#139 2007-03-05 17:41:31

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

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

you can certainly do it using the Txp standard gTxt() function that takes an array of key->value mappings.

Perfick! Much obliged.

Last edited by Bloke (2007-03-05 17:41:48)


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

#140 2007-03-06 20:20:58

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: MLP - The Multi-Lingual Publishing Pack

How about this: If I delete an article, it stays visible, no matter how hard I hit browsers’ cache controls. Article doesn’t even exist, if trusting renditions list. But keeps showing.

If I de-activate MLP, article is not visible anymore on front-end. If I re-activate, here we are again! If I change it’s status to draft, it disappears, as expected.

Any solutions, or have others been seeing this kind of behaviouring?

Edit ///

If I look database with rss_admin_db_manager, txp_l10n_articles table doesn’t show the article either. Where on earth it is hiding?

Edit 2 ///

…And actually it exists in the database, not in txp_l10n_articles, but in (rendition table?) txp_l10n_txp_en_gb. For first aid :) can someone tell me what kind of SQL query should be wrote to drop one article from the table?

Edit 3 ///

One thing yet, don’t know if this have anything to do with above: After editing and saving existing article, this can be found at the end of edit page:

Fatal error: Call to undefined function: retitle_article() in /www/customers/mydomain/public_html/textpattern/lib/l10n_admin.php on line 680

And there can not be seen usual “go-drop down menu”, Textpattern version number, logged in user” and “logout” things. So it leaves whole end of the page off.

Last edited by ultramega (2007-03-09 12:31:23)

Offline

#141 2007-03-07 17:26:54

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

Re: MLP - The Multi-Lingual Publishing Pack

Hi steve.
I’ve been playing a bit with this incredible plug-in and I think I’ve found a bug. Not sure if it has been already reported because I didn’t read through the 15 pages.

First: I have tried this on a clean TxP install with just your plug-in pack (the admin library, the ZCR lang and the i10n plug-ins) and rss_db_admin manager installed.

The installed languages: en-us, es-es, de-de.
The public languages: en-us, es-es, de-de.
The default admin language: en-us.
The en-gb language hasn’t been installed.

This is what happens:
first , I went to the MLP/Plug-ins tab. There, the 2 MLP-compatible plug-ins (i10n and ZCR lang) were listed in the left column.
Also, in the middle column of the screen, there is a list of the all the plug-in strings with the current available renditions of each string and an * if there is a missing rendition.
In both plug-ins, the middle column shows that the string are, by default, just translated to [en-gb].
That’s ok and correct, because those plug-ins have en-gb as the default language.
In the right column (where the statistics are displayed) , the en-gb row is marked with * and it says that I can delete the en-gb renditions because they are not being used in the public side. Also, please remember that en-gb isn’t being used in the admin/public side.

The problem is: if I delete the en-gb renditions, then all the strings disappear in the middle column and I’m no longer able to translate the strings to en-us/es-es/de-de.

One workaround is: first , to translate all the plug-in strings to en-us/es-es/de-de and then, after that, it seems to be safe to delete the en-gb renditions. But be careful, because when you delete a plug-in rendition for one language, that language is deleted for all the available MLP-compatible plug-ins (there is a modal that prompts telling that, so, it’s normal behaviour and not a bug).

So, as a summary: if there is a list of plug-in strings that are just translated to a language (usually, en-gb) that isn’t being used in the admin/public side (and so, you are allowed to delete its renditions) and you haven’t yet translated them to any other installed language, then, if you delete the en-gb renditions, you loose all the strings (= all the strings that hasn’t been translated) and so, you are no longer able to translate them to any other installed languages.

I hope I have explained the problem. Excuse my english!

Last edited by maniqui (2007-03-07 17:32:40)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#142 2007-03-11 17:24:56

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

Re: MLP - The Multi-Lingual Publishing Pack

Other workaround to the above problem is to avoid installing any language that isn’t going to be used in the public side.
This way, the MLP/Plug-in tab doesn’t tempt you to delete anything…

Of course, the problem is: you may need to install a language for the admin side without needing it in the public side. But I’m not sure if this is a very common situation.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#143 2007-03-13 17:19:15

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

Re: MLP - The Multi-Lingual Publishing Pack

This may be a daft question but can I programmatically ‘set’ the language such that all future page requests are returned in the given language? I’ve been messing around with calling _l10n_set_browse_language() but can’t figure out how to make it do what I want.

The scenario is: when someone logs in, they submit their login & p/w info via a form. The form submission is checked against the database and their credentials are pulled from the DB if all is well. One of those credentials is their preferred language so I want to force the language to this such that the next “your account” page (and hence all future pages) are in that language.

Am I being blind and missing some obvious call that’ll allow me to do this? Ta.

Edit: Scratch that, I was being stupid not blind… figured out it helps if I actually read the value back again using l10n_get_lang() * embarrassed cough *

P.S. still got that strange Firefox hanging issue. It’s not just rev 602; happens in the previous version too but I didn’t notice it when I first installed it, so something must be interfering. I disabled all my add-ons in case it was those, but it still prevails. If it’s a plugin clash, I can’t figure out why it would only affect Firefox and not IE or Opera… strange.

Last edited by Bloke (2007-03-13 18:54:14)


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

#144 2007-03-18 20:49:06

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: MLP - The Multi-Lingual Publishing Pack

I just want to append my Test Data here for completeness.

TXP Source

Textpattern version: 4.0.4 (r2253)

MLP Pack

rv 600

Server Info

Temporary directory path: /private/var/tmp
Site URL: example1.dev
PHP version: 5.1.6
GD Image Library: bundled (2.0.28 compatible); supported formats: GIF, JPG, PNG.
Server Local Time: 2007-03-18 22:34:06
MySQL: 5.0.19
Locale: en_GB.UTF-8
Server: Apache
Apache version: Apache
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Darwin 8.9.0
Active plugins: mcw_templates-0.3m, rss_admin_db_manager-4.3m, anc_hide-1.0, ied_plugin_composer-0.4, gbp_admin_library-0.4.581, l10n-0.6.600, zem_contact_lang-mlp-4.0.3-MLP, zem_contact_reborn-4.0.3.19, rss_admin_show_adv_opts-0.1

Pre-flight check:
————————————
/path_from _root/Sites/dev_example1/textpattern/setup/ still exists
Some Textpattern files have been modified: /lib/txplib_db.php
clean_url_data_failed:
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

#php_value register_globals 0

————————————

Tested Browsers ( platform mac os x 10.4.9 )

Firefox v 2.0.0.2 ( Developer Extension, Firebug and lots of addons installed )
Safari v 2.0.4 build(4.19.3)
opera
Version
9.02

Build
3512

Everything seems to work fine. ( See platform and browsers above )
Unfortunately I can not reproduce the errors, that Bloke describes and also I am unable, to test stuff from windows platform right now, although the Testing mashine is back, the smb filesharing creates a couple of problems of access delays with TM, so I ahd to revert back to local testing on a single mashine for the moment.

I will try to complement anything that I observe at this post while I go along to play with it .

IMPORTANT:

The admin-language switching in order to work, must be performed from the top right title-bar dropdown and
not form the default admin-lang prefs.

regards, marios

Last edited by marios (2007-03-18 21:05:10)


⌃ ⇧ < ⌃ ⇧ >

Offline

#145 2007-03-18 22:38:50

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: MLP - The Multi-Lingual Publishing Pack

I don’t know if this is an Issue yet, but the Author URL’s don’t have the lang URL part appended, eg.:
I have something like this:
http://example1.dev/autor/marios+buttner/
but:
http://example1.dev/author/marios+buttner/
doesn’t work.

Better would be:
http://example1.dev/de/author/marios+buttner/

regards, marios

Last edited by marios (2007-03-18 22:40:03)


⌃ ⇧ < ⌃ ⇧ >

Offline

#146 2007-03-19 09:51:08

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

Re: MLP - The Multi-Lingual Publishing Pack

Thanks for your input marios. If it helps any, here’s my diagnostics for info:

Textpattern version: 4.0.4 (r1973)
Temporary directory path: /home/tmp
Site URL: www.nemotv.com/venturiweb
PHP version: 4.4.4
Server Local Time: 2007-03-19 09:16:42
MySQL: 4.0.27-standard
Locale: en_GB.UTF-8
Server: 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
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
PHP Server API: apache
RFC 2616 headers:
Server OS: Linux 2.4.21-40.ELsmp
Active plugins: chh_article_lib-1.04, chh_article_custom-1.15, chh_if_data-0.10, chh_related_articles-0.41, wet_if_page-0.1, zem_contact_reborn-4.0.3.17, mem_self_register-0.8.3, smd_lib-0.2, zem_article_info-0.2, zem_article_image-0.1, rss_admin_db_manager-4.3, pap_xpoll-0.2m, rss_admin_show_adv_opts-0.3, upm_savenew-0.4, l10n-0.6.582m, ied_plugin_composer-0.4, sed_plugin_library-0.3, sed_copyright-1.3, rss_auto_excerpt-0.4, gbp_admin_library-0.4.581, zem_contact_lang-mlp-4.0.3-MLP, smd_slimbox-0.22, smd_random_banner-0.21, ign_password_protect-0.5, asy_wondertag-0.5

Pre-flight check:
————————————
Some Textpattern files have been modified: /lib/txplib_db.php, /publish/comment.php
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

#php_value register_globals 0

————————————

Unfortunately I can not reproduce the errors, that Bloke describes

It is very strange why it only affects Firefox. And not just Firefox on this machine at work, but the same at home (I was running different versions, now they’re both running 2.0.2).

I was looking at some Firefox support/add-on forums and found that people had problems with upgrading to v2 from v1.5 so I uninstalled it, deleted my Program Files/Firefox directory, deleted my profile and re-installed from scratch. It’s fixed one problem I had with Firebug (CSS not showing up) but the TXP interface still exhibits the same problem :-(

I wonder if it’s to do with me running the site as a sub-directory instead of directly off a domain? I’d love to find an error log somewhere or some debug output that might tell me what it’s trying to do when it hangs as I switch between TXP tags like ‘admin’ to ‘presentation’.

BTW, the ign_password_protect, mem_self_register and asy_wondertag plugins are recent additions as I’m messing with TXPhorum, so I don’t think it has anything to do with them.

I’m currently running the TXP interface under Opera 9 with no problems, so it’s not a show-stopper; it’s just odd why it’s happening only in Firefox when the MLP plugin is activated.

Last edited by Bloke (2007-03-19 09:52:53)


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

#147 2007-03-20 16:55:03

M_i
Member
Registered: 2006-03-05
Posts: 122

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

FireFusion wrote:

Any idea how we should try to fix this yet?

Sorry, none at the moment. On the face of it that looks like a php error and I haven’t seen the likes of it before.

I had the same problem as FireFusion (MLP turns write tab into a null page), and I managed to solve it by switching from PHP 5.2.1 to 4.4.2 (on a Debian server). Perhaps that helps in pinning down the issue.

Thanks for this fabulous plugin!

Offline

#148 2007-03-20 20:28:36

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: MLP - The Multi-Lingual Publishing Pack

Bloke, thanks for your valuable testing data as well ( Allso your recent plugins are really a marvellous work, but I couldn’t try them out yet. You are really a Giant, as rloaderro once iterated )

However, I wanted to figure out what’s up with this, so I raised the bar a bit for MLP, and opted for a secend side install in a subdirectory, same specs as above, but instead of the THREE languages, I preinstalled 10 langauages (Also threw a little russian into the mix) and the same plugins as above with ZCR latest.

I prefer to keep it like that, before I augment the functionality ( no hacks no other plugins, just the basic functionality )

Unfortunately once again I can’t reproduce this and my Firefox is upgraded as well from version 1.5 AFAIK.

The setup procudere runs down the items with success again as above, and the basic URL behavior seems to work fine from the front end aexcept, that the lang URL part is missing on the permlink URL in this case.

So obviously we need a bunch of more testing data.

Is there anyone with a simular Testing Environment, that can repruduce, what Bloke’s describes above ?

We also obviously need more testing input for windows platforms

ultramega wrote

If I de-activate MLP, article is not visible anymore on front-end. If I re-activate, here we are again! If I change it’s status to draft, it disappears, as expected.

Any solutions, or have others been seeing this kind of behaviouring?

@ultramega, when you delete the article, did you do that from the content/renditions tab or the MLP/article table ?
( In my current undertanding, the correct way to do this being a Power User, that is allowed through the MLP prefs, is to use the latter option, clicking on the delete Icon link( which works fine on my installs ) However, this means obviously maybe an implementation error, that should be addressed at some point. )
In order to have the priviledges as a Power User to change/ remove an articel frome the renditions tab, there is a setting in the MLP prefs, that is set to off by default, it’s in the MLP docs as well :))

One possible usefull addition to the UI in the renditions tab, would be to add an extra column that specifically indicates the language, of a rendition may be with some small flags or something.
( That would prevents Power Users from mistakenly remove the wrong lang rendition for a specific article )

Also what is your testing environment ?

( You can also just send it to Steve, if you you prefer that )

I found an Issue though, that is among the posssible User scenarios: ( Here it is the often overlooked backbutton option )

To reproduce: Delete a ( in this case life ) article from the articles table in the MLP tab, then change your mind, press your Browsers Back Button and finally press the clone link, this could be maybe suppressed somehow. ( Throughs a bunch of debugging output and Errors )

I’m also getting a double comment form, however didn’t look into that yet. ( In two languages, on the same page )
Could be Template Usage Issue from my side.

regards, marios

Last edited by marios (2007-03-20 21:20:54)


⌃ ⇧ < ⌃ ⇧ >

Offline

#149 2007-03-20 21:19:57

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

Re: MLP - The Multi-Lingual Publishing Pack

marios wrote:

I preinstalled 10 langauages … Unfortunately once again I can’t reproduce this and my Firefox is upgraded as well from version 1.5 AFAIK.

Thanks for doing that marios. It’s fun with over 10 languages installed isn’t it! That MLP>Articles matrix looks really cool with aaaall those boxes. Wouldn’t want to try many more without upgrading my monitor to widescreen, though :-)

Anyhow, here’s where this whole saga gets weird. I’ve been updating the site from Opera today and just for the helluvit I disabled a whole load of plugins then re-enabled them.

And I now cannot reproduce the problem in Firefox :-) It’s like it’s magically gone away.

In one sense this is good (it appears to have fixed itself) and in another it’s annoying because a) I never found out the precise reason why it was doing it, and b) I look like a chump! But I’ve been hammering away switching TXP tabs at an incredible rate for the past ten minutes or so and it’s not locked Firefox up once, so it really does appear to be playing nicely. I wish I’d been a little more systematic with my plugin disabling/enabling. Grrrrr.

I honestly can’t see why doing that would make a difference, so maybe it wasn’t that at all? Perhaps it was something in one of my default pages/forms that it didn’t like and when I changed the form today I got rid of whatever was annoying Firefox. * shrug *

If it ever comes back again I’ll be more thorough, but for now at least I’m back in business.

Many thanks for your diagnosing skills and time; I’m sorry it’s come to an inconclusive end on this particular issue. Your other testing is invaluable though and can only help to make things better for all of us.

Cheers.


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

#150 2007-03-20 21:39:35

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote

It’s fun with over 10 languages installed isn’t it! That MLP>Articles matrix looks really cool with aaaall those boxes. Wouldn’t want to try many more without upgrading my monitor to widescreen, though :-)

Well, that’s the maximum that could be handled conveniently at 1280 × 1024, in my case. ( which wouldn’t be the case though for all Users ). Probably overkill ( Imagine to localize 20 category titles and 50 link titles into 10 languages )

I probably won’t need more than three languages any time soon, but hey, it’s all possible at least with those environments that we’ve seen so for.

I honestly can’t see why doing that would make a difference, so maybe it wasn’t that at all? Perhaps it was something in one of my default pages/forms that it didn’t like and when I changed the form today I got rid of whatever was annoying Firefox. * shrug *

Ok, then the investigation get’s filed for the moment then.

I haven’t actually started yet to get my hands at complex templating work with Steve’s nifty tricks and l10lang tags, so let’s see how that goes.

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

Board footer

Powered by FluxBB