From: Bjoern V. <bj...@cs...> - 2006-03-26 12:22:02
|
Hello! I found that the search comment for Jabber user search is not translatable. Please take a look at the attached screen shot. I made this screen shot using the following steps: * Jabber account at jabber.org * search in "Accounts -> (my jabber account> -> Search for Users..." * "Select a user directory to search": users.jabber.org (default) * "Search Directory" There is an English comment "Find a contact [...] wild card searches (%)". The code comes from src/protocols/jabber/buddy.c: user_search_fields_result_cb() [...] if((instnode =3D xmlnode_get_child(query, "instructions"))) =09=09instructions =3D xmlnode_get_data(instnode); else =09=09instructions =3D g_strdup(_("Fill in one or more fields to search " =09=09=09=09=09"for any matching Jabber users.")); [...] The English text is not part of Gaim and not part of the Jabber daemon (searched in jabberd-2.0s10). My Internet search resulted in the fact that the English text is part of a Jabber configuration file: http://support.jabber.com/troubleshooting/know_base/jud_setup.html How should we deal with the original English text message? I see some possible solutions: (1) leave it as is (2) explain the user that this is a Jabber server comment (something like: _("Jabber server comment: ") + instructions) (3) don't use the server comment, only use Gaim's own comment (4) write a dummy translation string for this message (something like=20 char *server_comment_dummy=3DN_("Find a contact [...] wild " "card searches (%)"); if(instructions =3D=3D=3D server_comment_dummy)=20 instructions2=3D_(server_comment_dummy); else instructions2=3Dinstructions; of course this is pseudo code, not C) This only makes sense, if the server search comment is more or less a standard comment. (5) inform the Jabber maintainers about the problem I would prefer (2), may be in combination with (4) but let's discuss it. The missing i18n markers in the search results dialog are already reported in=20 http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1458542&group_= id=3D235&atid=3D713922 Greetings, Bj=F6rn |
From: Bjoern V. <bj...@cs...> - 2006-03-26 12:23:52
Attachments:
jabber-search-comment.png
|
Sorry, here is the screen shot. |
From: Richard L. <rl...@wi...> - 2006-03-26 17:46:22
|
On Sun, 2006-03-26 at 14:21 +0200, Bjoern Voigt wrote: > How should we deal with the original English text message? > > I see some possible solutions: > > (1) leave it as is > > (2) explain the user that this is a Jabber server comment > > (something like: _("Jabber server comment: ") + instructions) (2) is superior to (1). I've just committed something like that. We'll see how people like that. > (3) don't use the server comment, only use Gaim's own comment I don't like this; it throws away useful data. > (4) write a dummy translation string for this message > This only makes sense, if the server search comment is more or less > a standard comment. I think this might be okay for a couple really popular default strings, but it's also something that could quickly get out of control. Also, where do you draw the line? > (5) inform the Jabber maintainers about the problem This would probably require some sort of language negotiation between the client and the server and the server would need to have lots of strings configured. Unless someone who knows more about Jabber than me thinks it's futile, I'd say it's worth mentioning, but I doubt it'll get us anywhere, at least in the short term. Richard |
From: Etan R. <de...@ed...> - 2006-03-26 18:57:20
|
On Sun, 26 Mar 2006, Richard Laager wrote: > On Sun, 2006-03-26 at 14:21 +0200, Bjoern Voigt wrote: >> How should we deal with the original English text message? >> >> I see some possible solutions: >> >> (1) leave it as is >> >> (2) explain the user that this is a Jabber server comment >> >> (something like: _("Jabber server comment: ") + instructions) > > (2) is superior to (1). I've just committed something like that. We'll > see how people like that. > >> (3) don't use the server comment, only use Gaim's own comment > > I don't like this; it throws away useful data. > >> (4) write a dummy translation string for this message > >> This only makes sense, if the server search comment is more or less >> a standard comment. > > I think this might be okay for a couple really popular default strings, > but it's also something that could quickly get out of control. Also, > where do you draw the line? > >> (5) inform the Jabber maintainers about the problem > > This would probably require some sort of language negotiation between > the client and the server and the server would need to have lots of > strings configured. Unless someone who knows more about Jabber than me > thinks it's futile, I'd say it's worth mentioning, but I doubt it'll get > us anywhere, at least in the short term. > > Richard This "problem" of server messages not being translated into the correct localized language, and what to do about that came up on one of the jabber mailing lists somewhat recently. I don't recall if any sort of outcome was reached though. If I find time I'll go look for it, other people should of course feel free to find it before I get a chance. As to (5) there are a large number of jabber servers, with a large number of maintainers. Getting them to agree on any single string for instructions is not likely to be easy (since they likely have much different features and presentations for things). Which isn't to say you shouldn't try to talk to some of them, just that I'm not sure how useful any talking will be. (Especially since I can't really see how they are going to solve the problem.) -Etan |
From: Bjoern V. <bj...@cs...> - 2006-03-27 11:18:50
|
Hello all! > > (2) explain the user that this is a Jabber server comment > >=20 > > (something like: _("Jabber server comment: ") + instructions) >=20 > (2) is superior to (1). I've just committed something like that. We'll > see how people like that. Ok, I tested my committed change and think, it's ok. > > (3) don't use the server comment, only use Gaim's own comment >=20 > I don't like this; it throws away useful data. My question to Jabber experts is: How useful are these search comments for Gaim? The example comment from users.jabber.org was: | Find a contact by entering the search criteria in the given | fields. Note: Each field supports wild card searches (%) The search fields (First Name, Last Name, Nickname and E-Mail) are hard-coded in Gaim (see src/protocols/jabber/buddy.c). It's relatively clear that the user has to fill one or more of this fields to search. The only interesting information is, that wild card searches (with "%") are possible. =20 There is not much documentation about JUD (Jabber User Directory). Look at this README file from http://modzer0.cs.uaf.edu/wiki/index.php/Jabber/JUD: | JUD - Jabber User Directory | --------------------------- | http://jud.jabberstudio.org/ |=20 | This is the ANSI C implementation of a simple JUD (Jabber User Directory= ). | There are other implementations that handle a large user base better, | see the website above for links. |=20 | Unpack it into your jabberd 1.4.x server folder, and type 'make' to | build the jud.so. |=20 | Then add the following to your jabber.xml configuration file: |=20 | <service id=3D"jud"> | <host>jud.localhost</host> | <load><jud>./jud/jud.so</jud></load> | <jud xmlns=3D"jabber:config:jud"> | <vCard> | <FN>Local User Directory</FN> | <DESC>This service provides a simple user directory service.</DESC= > | <URL>http://jud.jabberstudio.org/</URL> | </vCard> | =20 | <!-- Enable full user listing retrieval by browsing to | 'jud.localhost/users' with your Jabber client. | Definitely not suitable for large user bases. | <userbrowse/> --> |=20 | <!-- You only need this section if you want customized | instructions or database fields | <register> | <instructions>Fill in the fields to register</instructions> | <name/> | <age/> | <colour/> | </register> --> |=20 | <!-- You only need this section if you want to customize | the search dialog | <search> | <instructions>Enter values to search</instructions> | <age/> | <colour/> | </search> --> |=20 | </jud> | </service> If I read the README right the search instruction section is only needed for customized searches (here with age and colour).=20 What's with the following situation: An example Jabber User Directory allows a search for additional fields like age and says this in it's search comment field. Then the user wonders about the missing field "Age:". Greetings, Bj=F6rn |
From: Vincent v. A. <adr...@gn...> - 2006-03-27 11:31:36
|
Op Mon, 27 Mar 2006 13:18:15 +0200 (CEST) schreef Bjoern Voigt <bj...@cs...>: > Hello all! >=20 > > > (2) explain the user that this is a Jabber server comment > > >=20 > > > (something like: _("Jabber server comment: ") + > > > instructions) > >=20 > > (2) is superior to (1). I've just committed something like that. > > We'll see how people like that. >=20 > Ok, I tested my committed change and think, it's ok. >=20 While it is better than (1), it's not ideal. > > > (3) don't use the server comment, only use Gaim's own comment > >=20 > > I don't like this; it throws away useful data. >=20 As Bjoern explains below, the information might not be that useful. > My question to Jabber experts is: How useful are these search > comments for Gaim? >=20 > The example comment from users.jabber.org was: >=20 > | Find a contact by entering the search criteria in the given > | fields. Note: Each field supports wild card searches (%) >=20 > The search fields (First Name, Last Name, Nickname and E-Mail) are > hard-coded in Gaim (see src/protocols/jabber/buddy.c). It's > relatively clear that the user has to fill one or more of this > fields to search. >=20 > The only interesting information is, that wild card searches (with > "%") are possible. =20 >=20 > There is not much documentation about JUD (Jabber User Directory). >=20 > Look at this README file from > http://modzer0.cs.uaf.edu/wiki/index.php/Jabber/JUD: <snipped pasted text> >=20 > If I read the README right the search instruction section is only > needed for customized searches (here with age and colour).=20 >=20 > What's with the following situation: An example Jabber User > Directory allows a search for additional fields like age and says > this in it's search comment field. Then the user wonders about the > missing field "Age:". >=20 > Greetings, Bj=F6rn Good point. The situation of hardcoded fields and custom messages is bogus anyway. We can remove/hide it safely and insert our own message, if needed. We could insert a "click here for server info" kind of widget. Perhaps that triangle flip open widget at the bottom of the window, with this text in it, or maybe a tooltip of somesort....I don't know, just thinking aloud. But a casual user should not need it anyway. The "use % for wildcard" text should stay though. Many will otherwise try to use * as a wildcard. Kind regards, Vincent van Adrighem |
From: Nathan W. <fac...@fa...> - 2006-03-27 13:47:21
Attachments:
signature.asc
|
Very few Jabber implementations use the hardcoded field names anymore. Most use the x:data implementation, which means that the instructions, and all field names and field types come from the server. There is a provision in some parts of XMPP/Jabber for the server to send multiple things with an xml:lang attribute, so we could start paying attention to that. Apart from that, it's pretty damn difficult to translate sanely. User search, chat room configuration, and a whole slew of other things are done this way, and it is the preferred way of getting information from the user. The list will only grow. Sorry to be the bearer of bad news. -Nathan |
From: Etan R. <de...@ed...> - 2006-03-28 18:29:51
|
On Mon, 27 Mar 2006, Vincent van Adrighem wrote: <snip> > Good point. The situation of hardcoded fields and custom messages is > bogus anyway. We can remove/hide it safely and insert our own > message, if needed. We could insert a "click here for server info" > kind of widget. Perhaps that triangle flip open widget at the bottom > of the window, with this text in it, or maybe a tooltip of > somesort....I don't know, just thinking aloud. But a casual user > should not need it anyway. The "use % for wildcard" text should stay > though. Many will otherwise try to use > * as a wildcard. You can't just remove server messages, they do have meaning or they wouldn't be there. Hiding the message is doable, though not really optimal. How exactly do you propose to keep part of server information? Keeping in mind that different servers have different instructions and different semantics. Some servers clearly use % as a wildcard, others might use * or & or anything else you can imagine. As Nathan pointed out, servers need to send information, the information needs to come from the server, this isn't going to stop, it's only going to increase as more jabber servers exist and more features exist. And the information is going to vary between different servers and possibly even between different versions of the same server. > Kind regards, > Vincent van Adrighem -Etan |
From: Vincent v. A. <adr...@gn...> - 2006-03-28 19:06:40
|
Op Tue, 28 Mar 2006 13:29:13 -0500 (EST) schreef Etan Reisner <de...@ed...>: > On Mon, 27 Mar 2006, Vincent van Adrighem wrote: >=20 > <snip> >=20 > > Good point. The situation of hardcoded fields and custom messages > > is bogus anyway. We can remove/hide it safely and insert our own > > message, if needed. We could insert a "click here for server info" > > kind of widget. Perhaps that triangle flip open widget at the > > bottom of the window, with this text in it, or maybe a tooltip of > > somesort....I don't know, just thinking aloud. But a casual user > > should not need it anyway. The "use % for wildcard" text should > > stay though. Many will otherwise try to use > > * as a wildcard. >=20 > You can't just remove server messages, they do have meaning or they=20 > wouldn't be there. Hiding the message is doable, though not really=20 > optimal. The problem here is with the message not being translated. It's of no use anyway to most people in non-english countries, so we might as well hide it. Imagine the message being in Japanese. Or worse, in a language you sortof understand, but not quite. You'd want it gone, right? The idea is to hide information that's more confusing than informative, but keep it there in case the user wants to know more. > How exactly do you propose to keep part of server information? > Keeping in mind that different servers have different instructions > and different semantics. Some servers clearly use % as a wildcard, > others might use * or & or anything else you can imagine. I'm sorry about the fuzzyness of my reply. I didn't mean keeping part of the message. I meant replacing the server message with a fixed message explaning the "% is a wildcard" thing. But as you explain in your text here, that would be no solution. Maybe a "% or * might be a wildcard" line... > As Nathan pointed out, servers need to send information, the > information needs to come from the server, this isn't going to > stop, it's only going to increase as more jabber servers exist and > more features exist. And the information is going to vary between > different servers and possibly even between different versions of > the same server. Different versions of gibberish don't make no useful message. That's what I was trying to make clear. We have a problem where people can't read English text. That is why we translate in the first place. The ideal solution would be to get into the development process of all jabber server software and translate it there. Then we could use the xml:lang stuff nathan writes about. But that's only a long term solution. Not a 2006 solution. This simple translation problem is slowly turning into a fundamental problem, eh? Hmmm, just thinking out loud here: Would it be possible to pipe the server message through gettext? We could then, for example, translate the three most used messages. And when they change, they will be English again, but the user might be able to do something with the info. that, in combination with some hiding, would be a (albeit very hackish) workable situation, right? I repeat, just thinking out loud. Kind regards, Vincent van Adrighem |
From: Bjoern V. <bj...@cs...> - 2006-03-28 21:03:34
|
Hello! Vincent van Adrighem <adr...@gn...> wrote: > This simple translation problem is slowly turning into a fundamental > problem, eh? Hmmm, just thinking out loud here: Would it be possible > to pipe the server message through gettext? We could then, for > example, translate the three most used messages. And when they change, > they will be English again, but the user might be able to do something > with the info. that, in combination with some hiding, would be a > (albeit very hackish) workable situation, right? I repeat, just > thinking out loud. Yes, this is possible. I tried to explain it in my first mail in this thread: | (4) write a dummy translation string for this message |=20 | (something like=20 | | char *server_comment_dummy=3DN_("Find a contact [...] wild " | "card searches (%)"); | if(instructions =3D=3D=3D server_comment_dummy)=20 | instructions2=3D_(server_comment_dummy); | else | instructions2=3Dinstructions; | | of course this is pseudo code, not C) | | This only makes sense, if the server search comment is more or less | a standard comment. Also we can look for a list of "standard" Jabber server comments and translate them. Can someone give me a good list of Jabber User Directories? (I only know users.jabber.org). It's not much work to query all this servers for their User search comments using Gaim.=20 Gettext automatically selects the original language (in most projects this is English) if it doesn't find the translation of the string in the catalog. Gettext needs to do this because often translations are more or less incomplete (look at http://gaim.sf.net/i18n for example) and programs normally should not crash on an incomplete string. (A little i18n story: I recently visited a bug tracking system with a browser with German language preference. The web-site crashed with a Java exception. The web-master told me, that a missing translation caused the Java exception. gettext() silently ignores missing translations, Java's standard localization method throws an exception which _can_ crash the whole application if not handled.) So in German locale gettext("Hello World") is "Hallo Welt" if the German translator has translated "Hello World". Otherwise gettext("Hello World") returns "Hello World". Greetings, Bj=F6rn |
From: Vincent v. A. <adr...@gn...> - 2006-03-29 10:03:18
|
Op Tue, 28 Mar 2006 23:02:52 +0200 (CEST) schreef Bjoern Voigt <bj...@cs...>: > Hello! >=20 <snip> >=20 > Can someone give me a good list of Jabber User Directories? (I only > know users.jabber.org). It's not much work to query all this > servers for their User search comments using Gaim.=20 >=20 <snip> >=20 > Greetings, Bj=F6rn Hi again, I don't think many JUDs are in use. I searched around a bit, and all services I found point to jabber.org for the JUD. That would make sense too. Having a central JUD instead of having dozens of 'em makes finding someone a lot easier. Maybe gmail has its own JUD, but I didn't find it. Kind regards, Vincent van Adrighem |
From: Etan R. <de...@ed...> - 2006-03-30 03:45:39
|
On Tue, 28 Mar 2006, Bjoern Voigt wrote: <snip> > Also we can look for a list of "standard" Jabber server comments and > translate them. Translating server messages in gaim sounds like a really bad idea to me=20 (especially in light of a recent thread which had complaints about the=20 amount of translatable strings in gaim =3D). > Can someone give me a good list of Jabber User Directories? (I only know > users.jabber.org). It's not much work to query all this servers for > their User search comments using Gaim. I believe there are working JUDs in C, python, and perl. You should be=20 able to find out about them on jabberstudio.org (though that site was=20 better back before the break in), and by using google. <snip> > Greetings, Bj=F6rn =09-Etan |
From: Bjoern V. <bj...@cs...> - 2006-04-05 10:46:15
|
Hello! I wanted to write some code, which tries to translate the user search comment from users.jabber.org. Nearly all Jabber services seam to use users.jabber.org as a user directory. Unfortunately Gaim does not find the JUD (Jabber User Directory) users.jabber.org at all since some days. So I can not test my patch any more. jabber: Sending (ssl): <iq type='get' id='gaim44faa493' to='users.jabber.org'><query xmlns='jabber:iq:search'/></iq> jabber: Recv (ssl)(236): <iq from='users.jabber.org' to='MY-...@ja.../Gaim' type='error' id='gaim44faa493'><query xmlns='jabber:iq:search'/><error code='404' type='cancel'><remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq> Is this a Gaim bug or is the JUD at users.jabber.org really down? "ping users.jabber.org" works. Greetings, Björn |
From: Bjoern V. <bj...@cs...> - 2006-04-10 19:37:53
Attachments:
jabber-user-dir-comments-i18n.patch
|
Hello Richard! I wrote some code which translates known Jabber User Directory (JUD) search comments. Currently there is only one comment in the list (the comment from users.jabber.org). users.jabber.org is the standard JUD server for Gaim and it is the most important JUD in Jabber networks. (I didn't find any other working public JUD server). Could you please commit my patch? I tested it and didn't found problems with it. Greetings, Bj=F6rn |
From: Richard L. <rl...@wi...> - 2006-04-10 20:08:37
|
On Mon, 2006-04-10 at 22:03 +0200, Bjoern Voigt wrote: > I used the for-loop because otherwise it's not possible to print the > debugging message, if a new JUD search comment comes. With gettext alone > it's not possible to see I don't like the debugging message, and neither does Etan. We could take advantage of the fact that gettext doesn't honor #if 0... #if 0 /* This is for gettext only. */ > static const char * jabber_user_dir_comments [] = { > /* current comment from Jabber User Directory users.jabber.org */ > N_("Find a contact by entering the search criteria in the given fields. " > "Note: Each field supports wild card searches (%)"), > NULL > }; #endif Richard |
From: Bjoern V. <bj...@cs...> - 2006-04-10 20:45:14
|
Richard Laager <rl...@wi...> wrote: > We could take advantage of the fact that gettext doesn't honor #if 0... >=20 > #if 0 > /* This is for gettext only. */ > > static const char * jabber_user_dir_comments [] =3D { > > =09/* current comment from Jabber User Directory users.jabber.org */ > > =09N_("Find a contact by entering the search criteria in the given fiel= ds. " > > =09 "Note: Each field supports wild card searches (%)"), > > =09NULL > > }; > #endif Ok. This is clever.=20 I forget to write about another problem in the existing code: if((instnode =3D xmlnode_get_child(query, "instructions"))) { char *tmp =3D xmlnode_get_data(instnode); instructions =3D g_strdup_printf(_("Server Instru= ctions: %s"), tmp); g_free(tmp); } What happens, if tmp is NULL? I looked into xmlnode_get_data(). This function can return NULL. And probably a modified JUD can return such an XML-node without data. I think, the code is more safe with an test for tmp!=3DNULL. The problem exists both in the existing and in the patched code. Greetings, Bj=F6rn |
From: Richard L. <rl...@wi...> - 2006-04-10 20:57:47
|
On Mon, 2006-04-10 at 22:44 +0200, Bjoern Voigt wrote: > Richard Laager <rl...@wi...> wrote: > > > We could take advantage of the fact that gettext doesn't honor #if 0... > > > > #if 0 > > /* This is for gettext only. */ > > > static const char * jabber_user_dir_comments [] = { > > > /* current comment from Jabber User Directory users.jabber.org */ > > > N_("Find a contact by entering the search criteria in the given fields. " > > > "Note: Each field supports wild card searches (%)"), > > > NULL > > > }; > > #endif > > Ok. This is clever. > > I forget to write about another problem in the existing code: > > if((instnode = xmlnode_get_child(query, "instructions"))) > { > char *tmp = xmlnode_get_data(instnode); > instructions = g_strdup_printf(_("Server Instructions: %s"), tmp); > g_free(tmp); > } > > What happens, if tmp is NULL? Some systems will display "Server Instructions: (null)". Some systems will crash. Yes, this should be checked. Can you create a patch that addresses these concerns. If so, I'll apply it unless someone objects. Richard |
From: Bjoern V. <bj...@cs...> - 2006-04-10 21:31:20
Attachments:
jabber-user-dir-comments2-i18n.patch
|
Richard Laager <rl...@wi...> wrote: > > What happens, if tmp is NULL? >=20 > Some systems will display "Server Instructions: (null)". Some systems > will crash. Yes, this should be checked. >=20 > Can you create a patch that addresses these concerns. If so, I'll apply > it unless someone objects. Ok, the patch is attached (file jabber-user-dir-comments2-i18n.patch). Greetings, Bj=F6rn |
From: Richard L. <rl...@wi...> - 2006-04-10 23:42:46
|
On Mon, 2006-04-10 at 23:31 +0200, Bjoern Voigt wrote: > Ok, the patch is attached (file jabber-user-dir-comments2-i18n.patch). Committed. Thanks. Richard |