Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2018-12-27 16:55:23

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Feedback to: Textpattern CMS 4.7.2 Released

colak wrote #315767:

(…) but did you raise an issue on github?

No, not yet, I need to learn how this works.

Offline

#38 2018-12-27 17:17:06

etc
Developer
Registered: 2010-11-11
Posts: 5,132
Website GitHub

Re: Feedback to: Textpattern CMS 4.7.2 Released

GugUser wrote #315766:

My posts have the ability to be overlooked or maybe they are transparent.

Does anyone know an answer to this question (complete post)?

We are just waiting for a right person to answer. I think you can overwrite these strings in .ini language files, but don’t know how to inject them otherwise.

Offline

#39 2018-12-27 17:30:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: Feedback to: Textpattern CMS 4.7.2 Released

GugUser wrote #315735:

Is it possible to override this quotes in the config.php file (this would be the best solution)? Somewhat like define('txt_quote_double_open="«"'); (the example doesn’t work)?

Actually, it does look like something along those lines should work but using language strings with those codes. Textile has a method (also detailed here) for custom quotes and Textpattern does use it as well.

What you probably need to do is switch to your language, and then on the Admin › Languages panel, paste the following into the textpack box to override the standard settings.

#@language de-de
txt_quote_double_close => “
txt_quote_double_open => „
txt_quote_single_close => ‘
txt_quote_single_open => ‚

It’s the equivalent strings to these lines in the respective language’s .ini file.

Note: you’ll need to re-publish the articles to get textile convert them anew with the new symbols.


TXP Builders – finely-crafted code, design and txp

Offline

#40 2018-12-27 17:36:03

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Feedback to: Textpattern CMS 4.7.2 Released

etc wrote #315769:

I think you can overwrite these strings in .ini language files, but don’t know how to inject them otherwise.

I had tried that before I asked in the forum, but as strange as that is, there was no effect.

Now I will try out jacob’s suggestion.

Offline

#41 2018-12-27 17:48:58

etc
Developer
Registered: 2010-11-11
Posts: 5,132
Website GitHub

Re: Feedback to: Textpattern CMS 4.7.2 Released

GugUser wrote #315773:

I had tried that before I asked in the forum, but as strange as that is, there was no effect.

Now I will try out jacob’s suggestion.

Have you updated the corresponding language on the Language tab? Just out of curiosity though, jacob’s suggestion is much cleaner.

Offline

#42 2018-12-27 17:50:44

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Feedback to: Textpattern CMS 4.7.2 Released

jakob wrote #315772:

Textile has a method (also detailed here) for custom quotes and Textpattern does use it as well.

In these parts I made the changes in earlier versions, but that doesn’t work anymore.

What you probably need to do is switch to your language, and then on the Admin › Languages panel, paste the following into the textpack box to override the standard settings.

#language de-de…@

It’s the equivalent strings to these lines in the respective language’s .ini file.

Great, it’s simple and it works.

Thank you, jakob.

Offline

#43 2018-12-27 17:56:06

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Feedback to: Textpattern CMS 4.7.2 Released

etc wrote #315775:

Have you updated the corresponding language on the Language tab? Just out of curiosity though, jacob’s suggestion is much cleaner.

Yes, jakob’s suggestion is clean, without having to change core files. I like it.

Offline

#44 2018-12-27 18:04:03

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: Feedback to: Textpattern CMS 4.7.2 Released

I think Oleg’s suggestion would work just as well, but the ini file needs changing before installing Textpattern. It may make sense to create a de-ch.ini file with an appropriate own language code at the top to avoid the quotes being overwritten by subsequent updates (right, Oleg?).


TXP Builders – finely-crafted code, design and txp

Offline

#45 2018-12-27 18:10:59

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Feedback to: Textpattern CMS 4.7.2 Released

This is a controversial discussion because not all people likes these quotes «». There is also the other alternative for German »«. The question would be, how could this be solved so that everyone can choose which version they want?

Offline

#46 2018-12-27 18:27:25

etc
Developer
Registered: 2010-11-11
Posts: 5,132
Website GitHub

Re: Feedback to: Textpattern CMS 4.7.2 Released

jakob wrote #315780:

the ini file needs changing before installing Textpattern.

AFAIK, any change in .ini files made after the language install should be detected.

It may make sense to create a de-ch.ini file with an appropriate own language code at the top to avoid the quotes being overwritten by subsequent updates (right, Oleg?).

That could work but, to be honest, I have never really delved into language management.

Offline

#47 2018-12-27 21:37:13

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

Re: Feedback to: Textpattern CMS 4.7.2 Released

GugUser wrote #315781:

This is a controversial discussion because not all people likes these quotes «». There is also the other alternative for German »«. The question would be, how could this be solved so that everyone can choose which version they want?

Is there any mileage in being able to override strings on a per-language (file) basis as GugUser suggests – either in config.php or as a single .ini file somewhere that can act as an override. e.g.:

[@de]
txt_quote_double_close = "«"
txt_quote_double_open = "»"
txt_quote_single_close = "‘"
txt_quote_single_open = "‚"
[@fr]
hidden="Caché"
...

The contents of this well-known file could be included just like we do plugin strings on-the-fly with the proviso that you can only override strings that are already present (so we know their group) and thus only in languages that are installed. Any strings or language identifiers that are not represented in the DB are ignored.

Would something like that be beneficial to catch corner cases like this, or is there some better mechanism? Perhaps a de-ch language file is necessary, but are the conventions an accepted standard?


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

#48 2018-12-28 11:25:03

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: Feedback to: Textpattern CMS 4.7.2 Released

All could work, but having it in config.php means it doesn’t run the risk of being overseen when updating to a newer version of textpattern.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB