Open Bug 395705 Opened 17 years ago Updated 2 months ago

Linkify "bug X" and "attachment X" in *all* languages

Categories

(Bugzilla :: Administration, task, P3)

Tracking

()

People

(Reporter: fe, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Opera/9.02 (Windows NT 5.0; U; ru)
Build Identifier: 3.0.1

When install some localized templates and use it - Autolinkifyer stop working.

Reproducible: Always

Steps to Reproduce:
1. Install localized template (I use Russian). Switch on utf-8 flag.
2. Use this template.
Actual Results:  
Old good 'Bug 1234' isn't links anymore. And new 'Ошибка 1234' isn't links too

Expected Results:  
Both 'bug 1234' and 'Ошибка 1234' should be links.
No, it won't linkify both. It will only linkify the translated 'bug', see template/en/default/global/variables.none.tmpl.
Could we add 'comment' and 'attachment' in variable.none.tmpl so that this works for all locales?
(In reply to comment #1)
> No, it won't linkify both. It will only linkify the translated 'bug', see
> template/en/default/global/variables.none.tmpl.

Probably my english is so poor, that it's hard to understand me...

Look. I have an installation of Bugzilla with english templates AND russian templates. And some users use english lang, but others - use russian.

It's a good idea (imho), that both categories of users may use autolinkifier, undepend of preferred language.

In any way, in our bug database we use for word 'Bug' for linkifying 4 or 5 years. And now, after installing russian templates, all this old links vanished.

P.S. Term 'Ошибка' from template/ru/default/global/variables.none.tmpl - doesn't links too.
What do you do if you have all 4 localizations of Bugzilla 3.0.1 (en, de, fr, ru)? Should Bugzilla linkify all 4 translations of 'bug'? I guess you see what the problem is.
(In reply to comment #4)
> Should Bugzilla linkify all 4 translations of 'bug'? I guess you see what
> the problem is.

I see. I think, that Bugzilla should either linkify all 4 translations of 'bug' or linkify only 'default' template.

First case is ideal, becourse all users may follow links, written in all languages. There is no big difference between links 'bug 1234' and 'ошибка 1234': they are both points the same bug.

Second case is compromise. We link only one 'bug' term, from 'default' template (it is more simple for coding). It must be System setting, not User preference. Bugzilla admin may choose language or customize his own version of 'bug' term for links. In this case we have back compatibility for old installs, and reasonably enough freedom for new installs.
I think Fedor has a case, here. I think it's safe enough to linkify all four forms of "bug" if there are four languages installed. They can be joined with a | in the regex. Since they're all from different languages, they're *relatively* unlikely to appear all together in bad situations in a comment.

Fedor is also reporting another bug here, that UTF-8 strings are not correctly linkified. Most likely this has to do with bug 363153.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Autolinkyfier and localized templates conflicts → "bug X" and "attachment X" are no longer linkified if you have localized templates
I cannot imagine an installation with 4 different languages used by users! How are you supposed to interact with other users if everyone speaks a different language?? This makes me think that quoteUrls() shouldn't linkify strings based on the translation of 'bug' in the l10n template but on the language officially supported by the installation. For instance, b.m.o could have all 4 l10n templates installed, but it should still only linkify 'bug' even for french or german users as they would still have to write in english.
I can imagine one with two--English and some other language. That's enough to make this a valid feature.
Severity: normal → enhancement
Priority: -- → P3
Summary: "bug X" and "attachment X" are no longer linkified if you have localized templates → Linkify "bug X" and "attachment X" in *all* languages
Help me anybody, how can i get all terms 'bug' from all unstalled templates?
Or point me to the proper place for asking this question. Pointing to the documentation also will be excellent. Thank anyway :)
(In reply to comment #9)
> Help me anybody, how can i get all terms 'bug' from all unstalled templates?
> Or point me to the proper place for asking this question. Pointing to the
> documentation also will be excellent. Thank anyway :)

For English language support options kindly look at http://www.bugzilla.org/support/

Support questions in Russian belong to http://forum.mozilla-russia.org/viewforum.php?id=35
Here is my first step to resolve this bug.
This patch links only term "Bug" from "en" template.

I'm not so qualified in writing regular expressions, so I need some help in it. Now I can get in $bug_word terms "bug" from all installed templates, separated by any simbols, but I all my attempts to create a working regexp was failed.

I was also trying to make a loop (as you may see in commented code in patch), for substituting all terms one by one, but worked only first iteration of the loop.
Currently there is no single object containing the whole paradigm of some term in certain language.  Instead there are several unrelated terms.* items, and no certain way to enumerate them.

Instead we should make localized template contain actual regex somewhere, to be retrieved by linkifier.  global/messages.*.tmpl looks appropriate for the task, and we already have bug 470057 to collapse these messages.
(In reply to comment #13)
> Currently there is no single object containing the whole paradigm of some term
> in certain language.  Instead there are several unrelated terms.* items, and no
> certain way to enumerate them.

You mean something like 'bug/bugs' and 'Ошибка/Ошибки/Ошибке' etc?
(In reply to comment #14)
> You mean something like 'bug/bugs' and 'Ошибка/Ошибки/Ошибке' etc?

I mean UTF-8 regular expressions matching all phrases supported in English.  For example what *should* be matched in Russian:

https://bugzilla.mozilla-russia.org/show_bug.cgi?id=319#c0

Then instead of 

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla%2Fwebtools%2Fbugzilla%2FBugzilla%2FTemplate.pm&rev=&cvsroot=%2Fcvsroot#248 

we should retrieve such regexps in turn from *every* localized template set we have, and apply to $text.
(In reply to comment #14)
> You mean something like 'bug/bugs' and 'Ошибка/Ошибки/Ошибке' etc?

We should linkify what $terms.bug contains, nothing else (for now). We don't support "bugs 2 and 3" in english, so no need to support $terms.bugs, for instance.

Some related bugs: bug 320943 and bug 537073.
For Russian, $terms.bug is just 16% of overall usage in singular.  The rest 
are:

$terms.bug_gen $terms.bug_dat $terms.bug_acc $terms.bug_abl $terms.bug_obj

It is not always possible to rephrase for nominative, without harm to user experience.
Attachment #9385099 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: