Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetSimple 2.03 plus, unofficial build, for our Russian friends.
#1
Yesterday I received a message from Russian GetSimple user Deimos.

Apparently giving a page a Russian title would break the functions that normally take care of the slug. This would have very odd results: the page was saved blank and the data file wouldn’t have a name (just “.xml”).

He provided me with an array that could be used to convert the Russian alphabet into the Latin alphabet.

I implemented this into an unofficial GetSimple build (it has as of yet not been updated on the SVN nightly build) that I would like to share. Get it here.

This build introduces a new function: alpha_conv. It’s an alphabet converter that can be found at the top of /admin/inc/basic.php. This function is easily expended so if you are using a non-Latin alphabet but can supply us with a conversion array it will take only seconds to implement.

I would like to ask all our Russian users to test and comment. I couldn’t do a lot of real tests.

GetSimple 2.03 with Russian page title support.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#2
Zegnat, Thank you! Everything works fine!
Here is a new translation for version 2.03 - http://rapidshare.com/files/422280543/ru_RU.zip

I will be glad to help in any development for Russian users.
Reply
#3
Martijn, Is there a way we can implement this intot he current build, but only turn it on when a GSCONFIG variable is set or we are using the ru_RU language file?
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#4
Translator: Deimos

Interesting... Smile
Reply
#5
vsky Wrote:Translator: Deimos
Interesting... Smile
Sorry, translation did for myself, didn't think that I will spread somewhere. Should be:
Stanislav Ulver (vsky) - www.designskill.org, update to 2.03 - Deimos ;-)
Reply
#6
спасибо
Reply
#7
Why don't we release this as a plugin that just adds this function?

Does it really need to be in the core? (just one more thing the server would have to check before displaying or creating a page?)
JWH Technologies
Have any marketing ideas for Get-Simple? Let me hear them!
Reply
#8
OWS_Matthew Wrote:Why don’t we release this as a plugin that just adds this function?
Looking into that. I did it like this now because it’s easier. There is only one (?) hook into changedata and that’s after the slug has been specified and cleaning has been done. So I’d have to reparse information that the server has already wrongly-processed.

OWS_Matthew Wrote:Does it really need to be in the core? (Just one more thing the server would have to check before displaying or creating a page?)
It’s not really a big thing though, it’s a straightforward PHP string replacing function. I don’t think it would slow down the system very much.

ccagle8 Wrote:Is there a way we can implement this into the current build, but only turn it on when a GSCONFIG variable is set or we are using the ru_RU language file?
Wouldn’t be hard, but what would the idea behind that be? As I said, I don’t think it will really slow down anything (feel free to test that though).
Another alphabet that might needs to be added is the greek one. Would it then depend on the translation used what alphabet will be parsed? What if someone like vsky, based in Italy, uses an Italian translation for GetSimple but still needs to add pages in Russian?

Seems we all have questions about how this should be implemented, so I did the right thing putting this up as an unofficial build.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#9
Transliteration can be turned off in gsconfig, such as adding an additional parameter ('TRANSLIT', 'ru'); if an attribute is RU then basic.php, to handle an array of RU (Russian), if the IT, to handle an array of IT (Italy) and so on.
Who is it simply did not have to let him leave the parameter ('TRANSLIT', 'ru'); commented out - # define ('TRANSLIT', 'ru');
This will be a simple and universal way.
Reply
#10
Launched in the form of a plugin now. Get it on GetSimple Extend: ‘slug Transliteration’.

Important: don’t use this with the special GetSimple 2.03+ version. It’s made for the standard GetSimple 2.03.

This plugin uses your current translation file when it replaces your characters. Of course, no translation file is ready for this yet so I’ve attached a version of the Russian translation file (as Deimos made it) with a transliteration map added to it. After a little more testing I will release some better documentation on how to add transliteration to your translations and how you could make your own plugins use this.

For everyone concerned about speed: if no transliteration map is found in the current used language it will not parse anything. The language file is already included so this plugin causes no extra file reads either.

If you are experiencing any problems with it at the moment, please let me know in this topic.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#11
oooops
Reply
#12
I can’t seem to recreate those errors. What version of PHP and GetSimple outputted those errors? And when did you see them?
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#13
admin
admin
if the text for the link is not entered, try to save the page
Reply
#14
Weird.

I’ve tested both PHP 5.2.11 and PHP 5.3.0. With a clean GetSimple install, only this plugin and the special Russian language file and I didn’t get any errors.

Still, I think I know what the problem might be. So I’ve changed a few things and uploaded a new version of the plugin. Could you try again with version 2?
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#15
Notice: Undefined index: existing-url
Reply
#16
Do you have those errors without my plugin as well? Because they all seem to be caused in changedata.php before my plugin runs. You can try the following:

Find line 115 in changedata.php, it should be this:
Code:
if ( file_exists($file) && ($url != $_POST['existing-url']) )
Now change it to this:
Code:
if ( file_exists($file) && isset($_POST['existing-url']) && ($url != $_POST['existing-url']) )

Tell me whether that fixes your problems, if it does I will add that change to the core.

(It’s hard debugging a problem when you don’t see it yourself.)
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#17
error disappeared, but the page is not saved
Reply
#18
yes you spit (translation of Google) getsimple-s203 + works, if someone will need this feature let her use Big Grin
Reply
#19
Yes, GetSimple 2.03+ should work. But a plugin would be better.

If anyone else could try out the plugin and report back I’d be very grateful. I can’t figure out why Oleg keeps getting errors.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#20
Zegnåt Wrote:Yes, GetSimple 2.03+ should work. But a plugin would be better.

If anyone else could try out the plugin and report back I’d be very grateful. I can’t figure out why Oleg keeps getting errors.

Hi there Zegnåt. Just out of interest sake I also had a problem when testing with Oleg06 the cart system where suddenly it started moaning about the headers already being sent etc.. I solved it by using index-pretemplate and index-posttemplate triggers to allow
ob_start();
and ob_flush();

to be executed. The reason I mention this is, wont it be worthwhile just to do a small test. Give him a version where the load.php has ob_start and ob_flush at beginning and end and see if the problem goes away.
Just a thought ?
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#21
I don’t think that a buffer is of any use since my plugin is not supposed to output anything. It simply rewrites 2 variables. But thanks for the input, I’ll look into it anyway. You never know, right?
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#22
Hi there.

I suddenly had a idea.. maybe the problem is that the output buffer is getting full and then PHP is flushing it (flush not forced by code) and that is why it is suddenly a problem ?

you can also add this code to the loader.php for testing purposes


Code:
function headercheck($errno, $errstr, $errfile, $errline) {
    if (!(error_reporting() & $errno)) {
        return;
    }
    if (headers_sent()) {
      error_log('ERR : '.$errstr);
      error_log("HEADERS LIST : ".print_r(headers_list(),true));
    }
   //allow normal error reporting
    return false;
}

$tmp_old_hndler = set_error_handler("headercheck");

This sill create a header dump when ever a error occurs and headers was already sent back.

I almost feel certain it is the output buffer that is getting full and being flushed by the system. that is why the ob_start and ob_flush will work.

hope it helps
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply
#23
Ohh found it at last. Works like a charm. I updated pl language file with a small array.
Are there any special chars I should consider in the array, beside national uppercase and lowercase letters ?
Addons: blue business theme, Online Visitors, Notepad
Reply
#24
GetSimple should be able to handle punctuation and weird characters already. It really is up to you what characters you want to encode.

Out of curiosity, are you using the plugin?
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#25
ohh, I lost focus on this thread.
Yes, I'm using it. I added to translation file needed characters conversion array, and it's working gorgeous ! :]

If you say that standard special chars (such as ^ * ! ... ) are handled natively by GS, there's no need to add them.


1 question: have you considered to add code of this plugin into GS core ?
I think transliteration should be a part of core functionality, not as a standalone plugin, for those who know about it, and need it.
There are many users who don't know, that they shouldn't use national characters in file names, uri's, and this functionality is imo a "must have in GS".
Addons: blue business theme, Online Visitors, Notepad
Reply




Users browsing this thread: 1 Guest(s)