i18n issues with notifications texts (in E-mail)

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
LazyBadger
Regular
Posts: 176
Joined: Mon Aug 25, 2008 12:25 pm
Location: Russia
Contact:

i18n issues with notifications texts (in E-mail)

Post by LazyBadger »

I had to say that text in e-mail notifications is bad (from internationalization POV), and it's strange for me, because my very poor German tells me "In Deutsch Literatur at least 'User Name' from English also will not be 2-word combination, but just "Benutzernamen" and trouble must be detected earlier"
In short
Combine phrases (for comment and trackback notify) from separate words (OBJECT and ATTRIBUTE is dirty for many languages (I suppose), it sounds like a rough equivalent of smth. like "Ich stand und die Leute beobachten" in German. Phrases must be translated as phrases in context in my case

serendipity_sendComment() in include/functions_comments.inc.php

str. 1121

Code: Select all

              . "\n" . 'Weblog ' . NAME         . ': ' . stripslashes($fromName)
is bad twice:
1. hardcoded "Weblog" (must be WEBLOG from lang)
2. pair WEBLOG.' '.NAME (must be reversed and noun WEBLOG used in the genitive instead of nominative)

str. 1142-1145

Code: Select all

              . "\n" . USER . ' ' . IP_ADDRESS . ': ' . $_SERVER['REMOTE_ADDR']
              . "\n" . USER . ' ' . NAME       . ': ' . $fromName
              . "\n" . USER . ' ' . EMAIL      . ': ' . $fromEmail
              . "\n" . USER . ' ' . HOMEPAGE   . ': ' . $fromUrl
have the same problem N2 as 1121, with obvious correction: noun USER...

Fix is small and easy, I can do it (and 5 new lang-resources and replace old in code), but I think I have to notify for the possible global adjustment
Quis custodiet ipsos custodes?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: i18n issues with notifications texts (in E-mail)

Post by garvinhicking »

Hi!

I think best simply drop "USER" constant in function call so text can proper. Other constants be unique enough so "USER" is not addition at all. These constants stem from a long time ago so we never had the need to look into.

I just committed that change to SVN.

Thanks for heads up,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply