Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#133 2007-03-03 22:54:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

it is OK to have an English and a French (and Italian, and Japanese… etc…) rendition with exactly the same URL-only-title — MLP will just select the correct language table to pull them from. Hope that answers your question.

Spot on, thank you.

I’ll take the easy * cough * lazy road then and leave the URLs the same :-)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#134 2007-03-05 09:28:21

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: MLP - The Multi-Lingual Publishing Pack

BigMick, Firefusion
Thanks for the feedback on that. That looks like a potential php problem as the MLP pack doesn’t touch that file; getmicrotime() is a standard Txp function found in lib/txplib_misc.php and it just calls php’s microtime() function.
Are you getting any error messages when you run things?

Any idea how we should try to fix this yet?

Offline

#135 2007-03-05 11:54:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

The current version of the Pack doesn’t do the URL processing/re-writes correctly when installed in a subdirectory.

Ah yes, just found that out. Not a major hassle as I’m only in pre-alpha-alpha stage right now.

BigMick / net-carver wrote:

BM: Everithing seemed OK, but the /textpattern/idex.php does not seem to work.
NC: That looks like a potential php problem as the MLP pack doesn’t touch that file

I’m not sure if this is the same issue or may be related but since going to rev600 (602?) Firefox will hang when changing TXP tabs. Not all the time; maybe I’ll log in, click to the admin tab, click preferences and I’ll get the tab content fine, then click Presentation and it just stops, trying to load index.php forever. Once it’s happened, it’s game over. If I stop the page loading and try and click any tab, link, whatever, it does nothing from that point forward.

Even if I close the all my Firefox tabs/pages and put the URL in again, it’s the same; it won’t load the TXP interface. I have to actually close the browser and log in again to get going. A coupe of clicks later it’ll do the same, maybe when clicking a different tab.

Curiously, IE (6, not tried 7) doesn’t appear affected.

Are you getting any error messages when you run things?

No error messages, just a hung page. Do you think the server logs would help track this down? Anything I can send you that might help? I wonder if it is an add-on causing a TXP/l10n conflict? Should I try disabling each add-on in turn and see if I can find a culprit there?

If I (grudgingly!) go into IE, disable the l10n plugin, and log back into TXP on Firefox (I had 1.5.10, just upgraded to 2.0.2 and it’s the same issue) it runs fine. I can click back and forth between TXP tabs to my heart’s content.

I did wonder if it was the select/option edits I made so I rolled back to your original 10n plugin; no change :-(

BTW I’ve switched to debugging mode and found a warning with the mod I sent you, really sorry. It’s complaining about $selopts not being defined. Simple fix around line 834:

$selopts = '';
if( !empty( $list ) ) {
	if ($wraptag == "select") {
		$selopts .= ' onchange="location.href=this.options[selectedIndex].value"';
	}
	$list = $title . tag( join( "\n\t" , $list ) , $wraptag , " class=\"$list_class\"" . $selopts );
...

Last edited by Bloke (2007-03-05 15:21:06)


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

Txp Builders – finely-crafted code, design and Txp

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
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.

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: 11,446
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.

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: 11,446
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.

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

Board footer

Powered by FluxBB