bug and suggestion for typesetbuttons

Creating and modifying plugins.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

bug and suggestion for typesetbuttons

Post by stm999999999 »

Hello,

I see the following problem in the plugin:

I choose quotation mark "german2" / "Deutsch2" , but by clicking on the button the wrong opening quotation mark appears.

the plugin says

Code: Select all

“Englisch”  
„Deutsch1“ 
 „Deutsch2”  
»Deutsch3« 
 «Französisch»
but this appears to me in the editor:

Code: Select all

“Deutsch2”

This was the bug, now the suggestion:

It looks a little bit cryptic with the numbers, could the html-names be used?

Code: Select all

“Englisch” 
„Deutsch1“ 
„Deutsch2” 
»Deutsch3« 
«Französisch»
and for the other symbols:

Code: Select all

– 
• 
‘test’ 
’ 


– 
• 
‘test’ 
’

BTW, not only the double quotation mark should be effected by the config above, the single quotation mark should do, too:

Code: Select all

‘Englisch’ 
‚Deutsch1‘ 
‚Deutsch2’ 
›Deutsch3‹ 
‹Französisch›

And BTW: As the plugin help text says, that one of the hyphens should be a normal and one a short hyphen or dash or so:

Code: Select all

– 
‑

but 2011 is no dash, it is a non-breaking hyphen.

correct:

Code: Select all

— 
– 
for short and long hyphens


But the non-breaking hyphen seems ti be important and should be added, too.

And btw Strike-through does not need nobody. Better would be <del></del>, it looks like the same, but it is logical markup.


And, (yes this is the last :-))

in the german language file:

"Akzept-Button aktivieren" should be "Akzent-Button"

But, I do not kow, perhaps you mean one of these:

Code: Select all

Gravis (Accent grace) x0300 
Akut (Accent aigu) x0301
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Hey Stephan,
Thanks for the input! I probably won't get a chance to take a serious look at this until sometime next week, but I will try to get some of that cleaned up.

Matt
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Ok, I got around to this today...
I changed the quotes so that they are no longer language specific (cause that wasn't going to work over the long run) and instead implemented a bank of eight choices (the most common options I could find), for both single and double quotes.

I also did update strike to del.

I tried to go to using named entities where it was easy, but there were a few places where the javascript made it impractical.

Stephan (or anyone watching), if you could double check me I would appreciate it.

Basically, all this code was created with buttons (strong so you can see the differences):

Code: Select all

<strong>
Single quotes:
‘test’
‚test‘
‚test’
’test’
‘test‚
‹test›
›test‹
›test›

Double Quotes:
“test”
„test“
„test”
”test”
“test„
« test »
»test«
»test»

emdash:  —
endash:  –
bullet:  •
apos:    '
gave:    ́
accent:  ̀
space:   
center:  <div class='s9y_typeset s9y_typeset_center' style='text-align: center; margin: 0px auto 0px auto'>test</div>
strike:  <del>test</del>
amp:     &
</strong>
and resulted in this output:

Image

EDIT: It looks like some the numerical entities are translated in the "code" section, but they are actually added as encoded values.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

I will have a closer look next time, but one error occurs in the backend:

Code: Select all

Warning: Cannot modify header information - headers already sent by (output started at e:\anwendungsdaten\easyphp\www\blog2\plugins\serendipity_event_typesetbuttons\UTF-8\lang_de.inc.php:1) in e:\anwendungsdaten\easyphp\www\blog2\serendipity_admin.php on line 11
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Help! The error disturbes the media library! I cannot add an image to an entry! In the media-lib-popup the error text (see above) is shown and nothing else!
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Ok, this is probably because of a weird endline or invalid character that I have in the German UTF language file...

Could you take a look at the file and see if there is anything obviously wrong with it? I don't have an good UTF editing tools, so I probably screwed the file up. Menawhile, I'll switch my blog over to German and see if I can muddle though it to troubleshoot it!
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

bugfix:

in utf-8/lang_de.inc.php

Code: Select all

<?php # $Id: serendipity_event_typesetbuttons.php,v 0.1 12/21/2004 18:08:24
the beginnig of the line is not so correct, i think :-)

And at the end please add a "?>"
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Cool, thank you! I've updated the plugin in CVS (I did not bump the version, because it seems like this plugin has relatively few users...)

How's the plugin work otherwise?
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

mgroeninger wrote:Cool, thank you! I've updated the plugin in CVS (I did not bump the version, because it seems like this plugin has relatively few users...)
there are the first user who have the same problem and theydid not get an update, because of theversions-number
Ciao, Stephan
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Not sure who had problems, but I bumped the version number.
If people update to 0.6 it will fix the German language problems.
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Ok, I got around to this today...
I changed the quotes so that they are no longer language specific (cause that wasn't going to work over the long run) and instead implemented a bank of eight choices (the most common options I could find), for both single and double quotes.
Looks good, but perhaps it would be a good idea to help the user a little bit by choosing the right for the users language. So in my point of view a (language) after each example can be shown.

e.g. Type 2: „...“ (german)

to see, what quotes are used in which language:

http://en.wikipedia.org/wiki/Quotation_mark#Glyphs

oder in german but with a better overview:

http://de.wikipedia.org/wiki/Anführungs ... e_Sprachen
Stephan (or anyone watching), if you could double check me I would appreciate it.
It seems to be ok for me.
Ciao, Stephan
Post Reply