Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#2149 2013-01-21 02:09:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,720
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

adriano32 wrote:

turn on logging of mysql requests.

I’d also like to remove every single ‘@’ sign from in front of every single DB call inside MLP so at least I have some debug output to chew on!

Last edited by Bloke (2013-01-21 02:10: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

#2150 2013-01-21 02:13:29

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MLP - The Multi-Lingual Publishing Pack

adriano32 wrote:

I would have checked first if txplib_db.php file replaced with the one from MLP distribution and then turn on logging of mysql requests.

Yes I replaced the file with the MLP distro one.

Offline

#2151 2013-01-21 02:18:11

adriano32
Member
From: Ukraine
Registered: 2013-01-09
Posts: 15

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote:

OK, I’ll do the same in my copy and test it then commit the changes (probably tomorrow when I’m a bit fresher of mind).
Thanks for making this work: it’s a nice feature.

Sure! I’m happy to get it work too.

BTW, i already have one more feature request: what about MLP option for adding language bar in the head of the site?

f.e. if my site languages are uk, en, ru, and i have enabled «language bar» option, i will get at some place of every page links to these three localised site versions.

Last edited by adriano32 (2013-01-21 02:18:51)

Offline

#2152 2013-01-21 02:23:12

adriano32
Member
From: Ukraine
Registered: 2013-01-09
Posts: 15

Re: MLP - The Multi-Lingual Publishing Pack

jstubbs wrote:

Yes I replaced the file with the MLP distro one.

So, let’s see mysql logs?

UPDATE: You can edit txplib_db.php to allow debug in function safe_query($q='',$debug='',$unbuf='') by adding $debug = true; before if ($debug or TXP_DEBUG === 1) dmp($q); line or by deleting conditional

Last edited by adriano32 (2013-01-21 02:30:29)

Offline

#2153 2013-01-21 07:46:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,720
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

adriano32 wrote:

if my site languages are uk, en, ru, and i have enabled «language bar» option, i will get at some place of every page links to these three localised site versions.

Hmmm, you mean on the public side? Not sure. There are tags to allow you to generate your own language bar, but the wide array of ways people implement this (country flags, names, codes, etc) mean that having a tag that outputs a stock set of markup — while handy and potentially overridable via its container — will never please enough people to warrant adding it.

If you mean on the admin side as a shortcut to the site versions, then that’s different. Might be possible if people think it’s a good idea.

Incidentally there’s a feature in the MLP Wizard that inserts stuff into stock (default) Pages but I don’t think it’s worked since Txp 4.0.7 because the md5s haven’t been kept up to date. Spotted it yesterday in the code and made a mental note to investigate what that bit of code does. This pack’s a beast and I’m still only scratching around on the surface to fix stuff while I grok how it works under the hood. I think when Txp 4.6.0 rolls around it’ll be time to reinvent the pack as a proper plugin using the proposed meta store to stash renditions. Not sure how that’ll impact feeds though so we might have to be creative.


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

#2154 2013-01-21 11:58:00

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: MLP - The Multi-Lingual Publishing Pack

hi

just wanted to report that the installer claimed that it failed to create the language tables (l10n_txp_gb_en, l10n_txp_de_de, …).
but it actually didnt, the tables are all there.
here are some diagnostics, hope it helps anyhow..

Textpattern version: 4.5.4 (r4919)
PHP version: 5.3.10
MySQL: 5.5.28-log
Locale: en_GB.UTF-8
Server: Apache/2.2.22 (FreeBSD) mod_ssl/2.2.22 OpenSSL/1.0.1c mod_hcgi/0.9.4 DAV/2
PHP server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: FreeBSD 8.3-RELEASE-p1
Active plugins: zem_contact_lang-mlp-4.0.3.6-ML, gbp_admin_library-0.4.2, l10n-4.5.2
Admin-side theme: classic 4.5.4

btw. thanks bloke for taking over this plugin! guess there is a donation to be made ;)

Offline

#2155 2013-01-21 12:09:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,720
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

jens31 wrote:

just wanted to report that the installer claimed that it failed to create the language tables (l10n_txp_gb_en, l10n_txp_de_de, …). but it actually didnt, the tables are all there.

I suspect that was partly to do with InnoDB thing I found (see discussion a handful of posts above this one). The current master branch version which I’ll release in the next day or so once I get a chance to debug Jonathan’s problems fixes that.

btw. thanks bloke for taking over this plugin! guess there is a donation to be made ;)

Thank you very much, and you’re welcome. I enjoy this stuff.

Last edited by Bloke (2013-01-21 12:10:13)


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

#2156 2013-01-21 16:13:59

gour
Member
From: Hlapičina, Croatia
Registered: 2013-01-17
Posts: 124

Re: MLP - The Multi-Lingual Publishing Pack

Hello,

on the plugin’s homepage I see the following feature listed:

  • Each TxP user can choose their own admin language — and switch between admin languages at will.

and wonder whether it means one can use one language in the back-end (admin) and set another one for the front-end (visitor’s side)?

Offline

#2157 2013-01-21 18:23:28

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

gour wrote:

and wonder whether it means one can use one language in the back-end (admin) and set another one for the front-end (visitor’s side)?

You don’t ‘set’ the front-end language, the language that is served depends on the visitor’s browser settings. The back-end language can indeed be switched to any of the installed languages without effect on the front-end.

Offline

#2158 2013-01-21 19:17:04

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: MLP - The Multi-Lingual Publishing Pack

ups. what is happening here?
maybe also the InnoDB problem..?

txp throws 503 now. no chance to get inside.. frontend works normal.

internal_error "Can't create/write to file '/var/tmp/mysql/#sqlf062_1f85e_0.MYI' (Errcode: 2)
describe `textpattern`"
in /home/blablabla/textpattern/lib/txplib_db.php at line 120

DB-Connect was successful, but the textpattern-table was not found.

Edit:
äh? 5 minutes later txp is back again. halleluja. but what was it..?

Last edited by jens31 (2013-01-21 19:21:59)

Offline

#2159 2013-01-21 19:43:16

gour
Member
From: Hlapičina, Croatia
Registered: 2013-01-17
Posts: 124

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:

You don’t ‘set’ the front-end language, the language that is served depends on the visitor’s browser settings.

Only on that?

Iirc, from WP/Concrete5 etc. front-end can depend on several factors…

E.g. the content of this site is in Croatian, although the interface is not translated and it shows English, but no matter what are your browser preferences/settings, you won’t get English content. :-)

The back-end language can indeed be switched to any of the installed languages without effect on the front-end.

OK. That’s good.

Last edited by gour (2013-02-25 09:47:27)

Offline

#2160 2013-01-21 19:44:24

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,720
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

gour wrote:

use one language in the back-end (admin) and set another one for the front-end (visitor’s side)?

As an extension of what Els mentions, I should point out the public side uses session/cookies to track the visitor’s chosen language, should you choose to implement a language switcher of some kind. Thus multiple visitors get to see the site in any of the languages at any time.

On the admin side, however, you may only have one language set for the whole interface. This is normally fine but if you do find yourself in an international team you can throw wet_native into the mix which allows each Txp admin-side user to see the interface in any one of the desired, currently installed, languages.

MLP plays nicely with wet_native and disables some duplicate (potentially confusing) functionality if the two are running side by side.

EDIT: btw, MLP makes an educated guess as to a visitor’s language on the first visit to the site, based on the browser’s header info.

Last edited by Bloke (2013-01-21 19:46:08)


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

Board footer

Powered by FluxBB