CMSMS Forge : xml files with non-ascii char

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
User avatar
redwarp
Forum Members
Forum Members
Posts: 37
Joined: Wed Mar 24, 2010 5:36 pm

CMSMS Forge : xml files with non-ascii char

Post by redwarp »

Well, I'm developping a module, IPLock.
As I'm french, I made it in french.
And that means that I wrote the module description in french, and it contains accended accent.
My name contains accented accent as well : Benoît Vermont (check the "i", it's accented !)
Using the admin panel in CMSMS Forge, I uploaded my file, IPLock-0.3.4.xml, generated with CMSMadeSimple.
When, later, I tried to install it using the Module Manager, and, how, surprise ? Bad checksum error blahblahblah...
Then I started to think : could it be, like always, an encoding problem ?

Just to be sure, I tried to install another module, Import_Content. Why ? Because it's description is written in cyrillic, i.e. not ASCII chars. And I got the same bad checksum error

I opened my xml file, IPLock-0.3.4.xml, and its first line is :

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>
Funny. On my computer, the file is obviously encoded in UTF-8...
I tried to fix this first line, like this :

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
And uploaded this new file, named IPLock-0.3.5.xml
Well, it didn't fix anything.

I still have this awesome message "Bad Checksum blahblahblah"

Well... last resort... I removed the accent in my name (Now, I'm only Benoit Vermont), and rewrote the moddescription in english. No accented accent.
I then uploaded the file again, now named IPLock-0.3.5.1 and EUREKA ! It works ! No bad checksum error !

I guess I have a solution, but... it's not really what I wanted.
I mean, I wanted to translate the module, anyway, But I thought the moddescription, even in french, would work. And I thought the moddescription could be localized...

I posted this message, because I wanted to report a problem. Has anyone been confronted to the same kind of stuff ?

Cheers

--
Redwarp
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CMSMS Forge : xml files with non-ascii char

Post by calguy1000 »

Yes, we should support non latin characters in the name field... and I do know why it isn't working.  I am just wondering if I will break every other xml file available to fix it.

However...  for the rest, we require that everything for a module be in english first, and translated to other languages.
If there are modules that aren't in english first it won't be long before they disappear from the forge.  This is because
it makes the translation job easier, and actually improves usability for those people that don't know 'your first language'
but do know english.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
redwarp
Forum Members
Forum Members
Posts: 37
Joined: Wed Mar 24, 2010 5:36 pm

Re: CMSMS Forge : xml files with non-ascii char

Post by redwarp »

Really ?
we require that everything for a module be in english first, and translated to other languages.
Well, it's the first time I read that !
I'm okay to translate it in english, but my level is far from perfect. It's gonna be ugly. Euark.

When I read guides about creating modules, they said (they... always they. damn they) that if you develop a module, you should create a file named .php in the lang folder, and put additionnal langages in the ext folder. Never said nothing about writing it in english...

Anyway. This problem about ASCII char still sucks. Well, of course, it's unimportant, if we have to write in english. But still...
Because it would be great if the mod description could be localized as well, don't you think ?

Anyway, I'll work on a translation next week. It's getting late here, and I should leave the office and go home.

Have a nice day, evening, morning ?

--
Redwarp
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CMSMS Forge : xml files with non-ascii char

Post by calguy1000 »

Module descriptions can be localized as well... once it's translated.

However, yeah we've finalized on the english first thing for a few reasons
a) people don't have to translate from to   its just 'english' to
b) with the possible exception of french, english is the most predominant language in the IT industry
    (even the languages themselves are written assuming english... the function names are english or english abbreviations).

I'm sure somebody in the french translation project will be able to help you with translating the main lang file. to english.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
redwarp
Forum Members
Forum Members
Posts: 37
Joined: Wed Mar 24, 2010 5:36 pm

Re: CMSMS Forge : xml files with non-ascii char

Post by redwarp »

Na your right : english is the most predominant language in the IT industry.

It's just that : when I started this module, I didn't think I would share it. My boss asked me for this feature, so I developped it. In french of course.
But then I thought : what the hell, it could be usefull to other people as well !
And my superior gave me the green light to share it, and therefore, here I am !
With a minor detail to deal with of course : localisation.

Anyway, of course, Module description can be localized, but... The only place you can actually read this module description is when you use the Module Manager. And as for the Module Manager, it uses the Module Description written in the xml file. And it cannot be localised.
--
Redwarp
Post Reply

Return to “Developers Discussion”