Template talk:t

Definition from Wiktionary, a free dictionary

Jump to: navigation, search

Contents

[edit] Documentation

Templates {{t-}}, {{t+}}, {{trad}}, and {{trad-}} redirect here.

Use this template in the Translations section to format a translation of an English entry.

This template takes 3 positional parameters:

  1. language code
  2. translated word
  3. (optional) gender/number, one of m, f, c, n, s or p (See templates {{m}}, {{f}}, {{c}}, {{n}})
  4. (optional following) additional genders/number, should be in listed order

If the translated word does not exist on the foreign language wikt, use {{t-}}, if you know it does, use {{t+}}, and if the foreign wiki doesn't exist, use {{}}. If you don't know whether it exists, use {{t}}. In any case, these are changed by automation to correct them, so don't worry about it.

This is all you need to know to use the template; there are also some optional parameters and other details.


There are also three named parameters, sc=, tr=, and alt=

Language codes for Min Nan (nan) and Cantonese (yue) are fixed by the template, please don't use "zh-min-nan" or "zh-yue"! Code cmn also translates to "zh".

sc= specifies a script template, e.g. {{Arab}}. (Using a script template either inside or outside of {{t}} will not produce correct results.) For example:

* Arabic: {{t|ar|حاسوب|m|sc=Arab|tr=ħasūb}}, {{t|ar|كمبيوتر|m|sc=Arab|tr=kambyutr}}

tr= specifies the transliteration into roman (Latin) script, as also shown in the example above.

alt= specifies an alternate form of the word, not the pagename, to be displayed. (The 2nd parameter MUST be the pagename on the en.wikt and the FL wikt!). "alt=" and "sc=" work correctly if both are used. Don't use alt= to include the script template, just use both; that makes it easier for the bot to make sure all the "ar" Arabic entries have sc=Arab

Some examples for butterfly:

*Arabic: {{t|ar|فراشة|sc=Arab|f|tr=fará:sha}}; (fertito) ''(Morocco)''; (fartattu) {{italbrac|Tunisia}}
*[[Datiwuy]]: {{t|duj|buurnba}}
*[[Javanese]]: {{t-|jv|kupu}}
*Latin: {{t-|la|papilio|alt=pāpíliō}}
*[[Yoruba]]: {{t-|yo|labalábá}}

The 'bot code that manages the templates sometimes adds or removes another parameter, "xs=". It serves to optimize the generation of the section references. This reduces the number of template calls and transcluded text that must be processed. You don't need to try to add these, it is better if the 'bot does it.

You don't need to worry about it in almost all cases. The only case where you might want to is if you are changing a language name, or perhaps cutting and pasting from a similar language; if the xs parameter doesn't match the language name, it will generated the wrong section reference (until the 'bot gets to it). The simplest thing in this case is to simply remove it.

[edit] Customization of links

Note that Internet Explorer does not implement basic features of CSS 2.0 and 2.1 in any released version (6/7). So only the first set of customizations work with IE. All of the following work on all other browsers at their current or fairly recent revision and in IE8.

Each example is code that you add to User:(your username)/monobook.css (or another skin name if you are not using the default Monobook skin; the skin is set in Preferences).

[edit] Not showing links

The simplest case is hiding the links. To not show red links, to FL entries that don't exist:

.tneg { display: none }

to hide unchecked links add:

.tunk { display: none }

to hide them all, use:

.tpos { display: none }
.tneg { display: none }
.tunk { display: none }

[edit] Link colours

(tbd)

[edit] Removing parenthesis

To not show the parenthesis:

.tlcp { display: none }
.tlc  { display: inline }

[edit] Changing superscript and font size

To cancel out the superscripting and leave the font size normal:

.tpos { vertical-align: baseline; font-size: 100% }
.tneg { vertical-align: baseline; font-size: 100% }
.tunk { vertical-align: baseline; font-size: 100% }

similar code can be used to specify a different vertical alignment and font size. Likewise, other font attributes may be used.


The following do not work on Internet Explorer until version 8


[edit] Replacing parenthesis with brackets

Switch to the code without the parenthesis, and add the desired brackets:

.tlcp { display: none }
.tlc  { display: inline }
.tlc:before { content: "[" }
.tlc:after  { content: "]" }

[edit] Adding different symbols after the link

For example, to display lc+, lc-, and lc? instead of the parenthesis:

.tlc  { display: inline }
.tpos .tlc:after { content: "+" }
.tneg .tlc:after { content: "-" }
.tunk .tlc:after { content: "?" }
.tlcp { display: none }

[edit] Replacing the code with symbols

.tlcp { display:none }
.tpos a.extiw:before { content: "+"; }
.tneg a.extiw:before { content: "-"; }
.tunk a.extiw:before { content: "?"; }

note that since both .tlc and .tlcp are not displayed, the :before tag is attached to the extiw class.

[edit] Example: using a triangle on the baseline

.tpos { vertical-align: baseline; font-size: 100%; }
.tneg { vertical-align: baseline; font-size: 100%; }
.tunk { vertical-align: baseline; font-size: 100%; }
.tlcp { display:none }
.tpos a.extiw:before { content: "►"; }
.tneg a.extiw:before { content: "►"; }
.tunk a.extiw:before { content: "►"; }

and it should be clear how you can use 3 different symbols if desired.

[edit] Interwiki

Similar templates on some other language wiktionaries.

[edit] For t

[edit] For t-

[edit] Discussion

[edit] Creation of this template

I created this template while cleaning up the dysfunctional frtrad template. It allows to encapsulate translations and puts a star referring users to the other Wiktionary projects. I don't know if it will be accepted by the community or if it should be. Let's say it's an experiment for the time being.

It can be used as follows:

====Translations==== *Alanguagename: {{t|fr|pomme|f}} To produce: *Alanguagename: [[pomme]] ''f''


I'm curious how it will be received. Polyglot 00:18, 22 August 2005 (UTC)

Good work. It would be the standard in all translations and definitions in Wiktionary. --77.210.55.105 06:52, 6 October 2007 (UTC)

[edit] suggestions

Well, its good, apart from if u see necessary, then (as necessaire is not a noun, therfore neither m or f), u get left with some {{}} signs. I wouldnt know how to fix this --Expurgator t(c) 01:30, 22 August 2005 (UTC)

This doesn’t seem to be a problem. Both {{t|nl|baard|m}} and {{t|nl|baard}} {{m}} work, but they produce different results: baard nl(nl) m. and baard nl(nl) m.. I prefer the second. By the way, this template already existed: Template:trad, but I changed it a bit to make the star be more informative. henne 09:43, 8 November 2006 (UTC)
What do others think of this? I suggest to abolish the m/f/mf/n/c/p/s as fourth/fifth parameters, since it just makes the image more complex. I mean, you don’t have to use them, but I suppose we want some uniformity, so a consensus would be good.
So I suggest to use {{t|nl|ding}} {{n}} (rendered as ding nl(nl) n.) over {{t|nl|ding|n}} (rendered as ding nl(nl) n.). I think the second form sort of suggests the gender tag is part of the word, which we don’t want. henne 12:50, 8 December 2006 (UTC)
That's why a template, so we can fix it; I'll change the order for now. Robert Ullmann 21:19, 25 December 2006 (UTC)

How can one indicate the sense number? There may be a particular of the translated word that is the one one would want to indicate as the sense for the translation. I tried {{t|pt|morro (1)|m}}, but that creates a link to a nonextant word rather than a link to a particular sense (1) of an extant word. Perhaps that should be a named parameter since it doesn't always occur. Vivafelis 03:02, 13 April 2009 (UTC)

Unlike other wiktionaries, English Wiktionary does not utilise numbers as indications of particular senses. The reason in simple: if someone where to add or rearrange the senses at a target link (i.e. morro in your case), all the glosses in all the entries that link to it would need to be fixed. Therefore, just provide the link without any gloss (numerical or parenthesised prosaic) when adding translations, and on the target entry itself use {{qualifier}} to indicate which particular sense of the wikified English word the translation refers to. --Ivan Štambuk 07:03, 13 April 2009 (UTC)

[edit] Allow piped links

There should be some trick to allow piped links for the translation, or an extra argument for it. For example, on the page for uniform, I want to translate it with [[#Dutch|uniform]]. I cannot enter this as the second parameter. OTOH, just entering {{t|nl|uniform}} gives an incorrect wikilink. There must be some trick using {{isValidPageName}}. henne 15:56, 17 November 2006 (UTC)

The problem is in passing the parameter to this template. The work-around I think would look something like this:
[[{{{sc|{{{2|}}}}}}{{#if:{{{hash|}}}|#{{{hash}}}|}}|{{{dn|{{{sc|{{{2|}}}}}}}}}]] ...

Which would default in '2' for 'sc' if 'sc' is not given, and add the hash only if the variable 'hash' is passed in, then add a pipe and display only the 'sc'/'2' combination after that pipe. Note that if both '2' and 'sc' are not given, this will do funky things. But it would have the advantage of getting rid of the #if 'sc' thing at the start, which problably doesn't belong here anyway. To then call it from uniform, you'd have {{t|nl|uniform|hash=Dutch|sc=|dn=uniform}}. Please note that I haven't tested this exact combination anywhere yet. --Connel MacKenzie 19:11, 17 November 2006 (UTC)

sc is the script parameter, the name of the script template, not something defaulted to or from param 2. And you are making it way too complicated ;-) Robert Ullmann 15:23, 7 December 2006 (UTC)
Looks promising. Though maybe it should be even more general: remember my question in the Information Desk? Allowing alternative links or something. So instead of a ‘hash’ parameter, allow ‘al’ (for alternative link), which is the link or something.
It is totally unclear to me what the ‘sc’ param is doing there anyway. Funky things isn’t that bad, one should hope everybody makes a preview first when he uses a template, and would see that he did something wrong... henne 12:21, 20 November 2006 (UTC)
So that you can use (e.g.) {{ARchar}}, you can't use it in the 2nd parameter, and you can't wrap it around the whole thing. Robert Ullmann 15:23, 7 December 2006 (UTC)
I thought of a much easier solution: just always add the language hash to the link. This should always work, since that heading is supposed to be present. The problem then only is to derive the language name from the language code. I don’t know how to do this with the templating mechanism, but there must be some way to do this, right? Something like:
[[{{{2|}}}#<compute language name here>|{{{2|}}}]] ...

henne 15:04, 7 December 2006 (UTC)

Don't worry about sc=, it has little to do with this (just as to wrap the script template in on the right level and has no default). It is easy to convert language codes to names, except that a number of the less common languages have code templates with wikilinks and other cruft inside them. We really ought to say that all the 2- and 3-letter language code templates translate to just the en.wikt standard name, and nothing else. Robert Ullmann 15:23, 7 December 2006 (UTC)

Easy to do, and it won't change the call at all. But, if I do it now, it will break for (say) Kurdish, because {{ku}} translates to Kurdish rather than Kurdish. Robert Ullmann 15:23, 7 December 2006 (UTC)

You did something strange now: {{t|nl|ding}} now appears as ding(Nederlands). I think it was better before, where the abbreviation appeared in the subscript: ding(nl). What I am suggesting is that you make the piped link automatically include the hash to the language section. I think it would work like this:
{{#if:{{{sc|}}}|{{{{{sc}}}|[[{{{2}}}]]}}|[[{{{2}}}#{{#language:{{{1}}}|{{{2}}}]]}}
 {{#switch:{{{3|}}}|f|m|mf|n|c={{{{{3}}}}} <nowiki/>|}}{{#switch:{{{4|}}}|s|p={{{{{4}}}}} 
<nowiki/>|}}[[:{{#switch:{{{1}}}|nan=zh-min-nan|yue=zh-yue|cmn=zh|{{{1}}}}}:{{{2}}}|<sup>({{{1}}})</sup>]]

(without the linebreaks) Do you understand what I mean now? henne 12:45, 8 December 2006 (UTC)

Yes, but this won't work. #language is the name of the language in the language. We need the name of the language in English ;-) As I said, this would/will be easy if we can remove the wikilinks in some of the language name templates. (A language well-known enough to have a wikt ought not to be linked on every appearance anyway!) Robert Ullmann 21:19, 25 December 2006 (UTC)
See e.g. false#Translations for Dutch. I think it is really better to use the abbreviated version. henne 10:54, 9 December 2006 (UTC)

Due to the discussion about how the superscript should look, this issue hasn’t been solved: it still is not possible to use alternative links, which is necessary way more often than you would think. Can somebody at least temporarilly introduce this, perhaps like Connel suggested? henne 10:20, 10 January 2007 (UTC)

Since nothing is happening with this, I took a look at the Dutch wiktionary, where it is used for every translation. The code over there is this:

<span lang="{{{1}}}" xml:lang="{{{1}}}">{{#ifeq: "{{{3|{{{2}}}}}}"|"{{PAGENAME}}"| 
{{{3|{{{2}}}}}}|[[{{#if:{{{3|}}}|{{{3}}}{{{2}}}|{{{2}}}}}|{{{3|{{{2}}}}}}]]}}</span> <span 
class="trad-sup-code"><sup>{{#ifeq:{{{2}}}|nl|(nl)|[[:{{{1}}}:{{{3|{{{2}}}}}}|({{{1}}})]]}}</sup></span>

(without the linebreaks) It allows for piped links by making this the second parameter! This is only possible because they haven’t cluttered this template with information for gender and number, which I have always found a bad idea. The trick is that if the third param is present, it is used.

We can do away with the part {{#ifeq:{{{2}}}|nl|(nl), since we do not include the English translation (they have this strange policy of including the Dutch translation for Dutch words). I am also unsure what the test for PAGENAME is for.

Furthermore, it does nice CSS stuff to be able to hide the superscript, which will please SemperBlotto ;-).

Does anybody see a trick to integrate this, or will it break too much pages? The current layout also puts the gender info after the superscript link, so moving this out of the template wouldn’t change that. It would only get me a lot of work to correct all entries I edited that use it. :-(

[edit] Language names

Can’t we have the language codes instead of the language names spelt out, like vanNederlands. It is simply too much (and not even English). If we can’t use a common button such as ^ or *, then let at least keep it to two or three letters. —Stephen 04:21, 10 December 2006 (UTC)

That was an experiment by someone, I put it back to the code. Tried leaving off the parenthesis. Also changed the order of the link and the gender/plural markers. Robert Ullmann 21:19, 25 December 2006 (UTC)

[edit] Vote

Some talk about this has taken place in the Beer parlour and a vote on whether text or symbols should be used is taking place here. The first vote ends 15 January 2007, the second on 31 January 2007. Saltmarsh 11:44, 26 December 2006 (UTC)

[edit] Engineering

Since we've decided to use this, I'm doing some serious s/w engineering. Sections follow, separated if you have comments. Robert Ullmann 15:29, 24 January 2007 (UTC)

[edit] Link alternation

Use alt= parameter: {{t|(lang)|(pagename)|alt=(display name)|...}}

Plays well with the sc= parameter if needed. Robert Ullmann 15:29, 24 January 2007 (UTC)

Note that this is not needed for the case above: Dutch/uniform. The template does the right thing already. (see uniform) Robert Ullmann 15:35, 24 January 2007 (UTC)

[edit] Section references

The template links to the correct section in the entry in the English wikt IF the code template for the language does not have any wikilinking inside it (it shouldn't, as the existence of a wikt for a language indicates that it is a major language.) E.g. {{ku}} MUST be "Kurdish", not "[[Kurdish]]"

If you get bad formatting or links, check the language code template. Robert Ullmann 15:29, 24 January 2007 (UTC)

Someone else has been tiring himself here: {{Rhymes2}}, maybe you can use that, or get in contact with Jimp, so that he can use the trick you used here in {{Rhymes}}. henne 11:33, 25 January 2007 (UTC)

Um I see. And that method won't work anyway: if you invoke it more than one or twice (e.g. if t tried to do that), you will exceed the amount of wikitext that can be transcluded in a page. Robert Ullmann 14:47, 25 January 2007 (UTC)
The syntax has changed a bit now. A named parameter is needed for the section reference (ls for ‘language section’). Thus the syntax now is {{t|nl|data|ls=Dutch}}, if a link to the language is needed (which it is in this case, since data exists in a lot of languages. H. (talk) 14:03, 1 April 2007 (UTC)
And note that the user doesn't have to worry about it; the tbot will add the ls= parameter when needed, and remove it when not. But it is harmless to add it, as long as the language name is correct. Robert Ullmann 15:42, 1 April 2007 (UTC)

[edit] Symbol

I (or someone) will add a CSS class to allow logged in used to display a symbol instead of the language code as the link to FL wikt. This has not been done yet. Robert Ullmann 15:29, 24 January 2007 (UTC)

[edit] Performance

I'm beginning to really hate this template. Manually entering them one by one defeats the purpose of automatically adding a link to the FL wikt:. Manually cascading the DB searches for the stupid @#%%ing language name (from the language code) is a Bad Idea. Especially a couple HUNDRED TIMES on any given page...where the caching is flushed because it is a page, including a template, trancluding a different template, trancluding yet another template. For each appearance of {{t}}!

It seems pretty clear to me, that this should be done either in PHP on the server, or in Javascript on the client. My WT:VOTE in support was based on that premise. Why is the template still here? For a reference model?


This template also screws up WhatLinksHere, BTW. --Connel MacKenzie 19:28, 25 January 2007 (UTC)

Can you explain this a bit more for the not-that-knowledgeable in JS and inner workings of Wiki? I think (thought) the template is very nice, since it does a lot of things that save me typing. For example that FL wiki link. You wouldn’t expect me to enter <sup>([[:nl:word]])</sup> after every word, do you? That’s what templates are for, to standardise and save typing. Ok, maybe the language trick should be changed. We can still use {{Rhymes2}} (after renaming). henne 19:55, 28 January 2007 (UTC)
Connel worries a lot about performance issues I don't understand enough about (he refers to 3 levels of transclusion, there are at most two, but so on) ... What he is talking about with JS is doing something that doesn't require the t template, but does magic for each line in the Translations section when the page is rendered. We can't use the Rhymes2 thing anyway; never mind performance, once it gets transcluded a few times you'll hit the page limit. And I don't understand why or where it screws up Whatlinkshere. I wonder if there is something somewhere that explains more. Robert Ullmann 20:42, 28 January 2007 (UTC)
I just stumbled upon {{language}}, which is used in {{context}}. Since context is used a lot too, maybe we can just use language here (and in {{rhymes}}) too? henne 19:13, 29 January 2007 (UTC)
{{language}} is at least one level worse that what I was doing (what t does now), and only would increase Connel's complaint. He probably isn't complaining about {{context}} too much because it is only used a few times per entry, but it is a lot more complex (both in implementation and use) than it should be. At least t right now is just doing one straight template call. Robert Ullmann 21:32, 29 January 2007 (UTC)

All of the performance issues corrected in the current version; the only templates calls are for script, gender, and number, which occur in any case. Robert Ullmann 16:16, 1 April 2007 (UTC)

[edit] Issues implementing Template:t in translation sections

Implementation of this template's language link was discussed at length at Wiktionary:Grease pit archive/2007/March#Issues implementing Template:t in translation sections. —Mzajac 20:54, 10 March 2008 (UTC)

[edit] FL link

Link to the foreign language wikt is only generated if FL wikt exists. Robert Ullmann 17:23, 1 April 2007 (UTC)

[edit] Changed ls= to lang=

As requested by Connel; it also makes it easier for users who don't know the language code to use. Robert Ullmann 22:36, 2 April 2007 (UTC)

[edit] Hover text

I would like to add hover text to the interwiki link that makes it more clear that the link is to a foreign-language Wiktionary. The format of code:word may be immediately obvious to all of us and very clear to anyone who has contributed to the wiki projects, but it is not clear to a user who is unfamiliar with the format. This may not be so much a problem for blue links, more important for red links if you've ever wondered why people come here and write definitions in other languages. The two-letter language code, also in parentheses, doesn't completely identify this.

I don't think my addition of hover text, before it and several not so good contributions were reverted, made this distinction completely clear, but is there a better way to do it, maybe adding to the default code:word instead of replacing it? DAVilla 06:30, 3 April 2007 (UTC)

I think that was good, how about you re-add it. But I’d leave the order of FL link and gender info as it is. Notice that it doesn’t fit with our current policy about romanisations either (i.e. they should come between gender and word). H. (talk) 13:39, 5 April 2007 (UTC)
Thanks for the feedback. Putting the FL link at the end was an experiment that didn't last very long. I would like to see an example of what you think is best when everything is included. We might have to consider accepting the romanization as a parameter. DAVilla 15:30, 8 April 2007 (UTC)

[edit] Transliteration parameter

For translations into languages with non-Roman scripts, it would be nice for this template to support a parameter that gives the translation's transliteration. Using the "alt" parameter for this doesn't seem quite adequate. Thoughts? Rod (A. Smith) 16:50, 26 July 2007 (UTC)

How about "R" for "Roman alphabet"? How did this created with such an important piece missing? --Connel MacKenzie 01:08, 8 August 2007 (UTC)
Because the exact syntax of Translations lines hasn't been nailed down yet. The only issue here is that the template provides for gender and number, which usually come after the transliteration if present. It is possible to just ignore those parameters and use the m, f, etc templates after a transliteration as usual. Robert Ullmann 01:21, 8 August 2007 (UTC)
I added tr= as shown above. Robert Ullmann 13:08, 10 August 2007 (UTC)
Thanks, Robert. I'll start using this template for Korean translations now. Rod (A. Smith) 15:46, 10 August 2007 (UTC)
I'm eagerly awaiting the non-Roman script handling for Korean translations. Rod (A. Smith) 16:07, 10 August 2007 (UTC)
Oops. Somehow I hadn't noticed “sc”. Rod (A. Smith) 16:11, 10 August 2007 (UTC)

[edit] Should use standard red for redlinks

This template code is very hard to read so I can't see where the red colour comes from. It is different from the standard colour of redlinks though which is ugly. It should be made the standard colour. Also, if these colours are done with inline styles they should be moved to Common.css. I would've done this myself but I can't read the code. I'm available to help if there are any questions though. (Except that I'll be travelling again for the next 6 weeks) — Hippietrail 07:53, 6 August 2007 (UTC)

t itself does not use any explicit colors. t- uses color:red, and it should be very easy to read where (even if the rest is a bit dense!) Robert Ullmann 13:07, 6 August 2007 (UTC)
OK I've replaced the hard-coded "red" with hard-coded "#002bb8" which is the monobook colour for redlinks. But of course now I realize it should be a new shade that matches the external link blue (#3366BB in monobook). I'll see if I can find a good colour mixing site and make one. I've only just noticed that external links do go darker when they have been visited. I'll keep this behaviour for the red links. — Hippietrail 01:07, 7 August 2007 (UTC)

[edit] alt parameter

The second term must be the headword both here and on the FL Wikt. But with Old English, we on en.wikt use headwords without diacritics (like the Anglo-Saxons did), whereas ang.wikt marks long vowels with macrons in the pagenames. A word like belean (dissuade), for example, I want to write as {{t|ang|belean|alt=belēan}}, but obviously this will not work because if the OE wiktionary does have an entry for it it will be at belēan instead. Any thoughts? Widsith 20:22, 30 January 2008 (UTC)

[edit] Usage

Is this template for nouns only or adjectives as well? --S.Örvarr.S 15:23, 9 February 2008 (UTC)

It's for every part of speech, including nouns and adjectives. In using it with adjectives, there seem to be differences in opinion regarding whether to include the gender marker. (FWIW, I personally prefer to exclude the gender marker for adjectives.) Rod (A. Smith) 19:25, 9 February 2008 (UTC)

[edit] Foreign-language link format

1. If the foreign language is unknown or has no wiktionary, the template should leave out not only the link, but also its trailing non-breaking space. Currently, it inserts two non-breaking spaces in a row. Example, from Rusyn:

2. Formatting the foreign-language links by making them all three of superscripted, smaller, and surrounded by brackets is overkill. Functionally, it is more formatting than is needed to draw attention to their special status: the use of superscript already takes these links out of the text flow and indicates them as something special. The brackets add clutter and may be mistaken for other characters at their small font size. They do enlarge the link target, but this is just compensating for the needless small-font formatting, and shouldn't be necessary anyway because language codes are two or three letters long. The superscript also increases line spacing, making the display uglier in some web browsers.

I would suggest formatting these on the baseline as monospaced font (implying code), or at least remove one of superscripting or brackets. Examples for comparison:

  1. Current format: альбатрос uk(uk) (al’batrós) m.
  2. Superscript only: альбатрос uk (al’batrós) m
  3. Browser's default monospaced font: альбатрос uk (al’batrós) m
  4. Square brackets only: альбатрос [uk] (al’batrós) m

Mzajac 03:50, 10 March 2008 (UTC)

(1) {t} is only for use in translation tables, etymology inline uses {term}. If the FL wikt doesn't exist, use {{}} or just leave it and Tbot will fix it.
(2) the link format was very extensively discussed and voted on. Robert Ullmann 12:53, 10 March 2008 (UTC)
#1 is a flaw in the way this template displays. Wouldn't fixing it merely require a few characters to be moved inside of a switch statement?
2: In Safari, the superscripted link format destroys line spacing in the translation tables—it looks terrible, especially if a list item has several translations and wraps to two or more lines. Did the very extensive discussions consider this acceptable, or overlook it?
Can someone link to the very extensive discussions from this page? That might reduce misunderstandings, and save unnecessary work for both me and you. (I've spent a lot of time editing in Wikipedia, but I'm fairly new to Wiktionary. I don't make idle requests without looking for relevant discussion first. I'm becoming frustrated because people keep replying to my suggestions with "that was discussed, now run along", instead of responding to the actual question.)
Thanks. —Mzajac 15:20, 10 March 2008 (UTC)
(note that snide remarks in edit summaries and attitude are not helpful) (1) it will probably get fixed presently. Until then, use {tø} as pointed out or just don't bother with {t} at all since it isn't really accomplishing anything with nothing to link to.
(2) yes, it is annoying to be told that "all this was already discussed". Please note the converse effect: it is annoying to have people endlessly insist that something is wrong, when it has been thoroughly hashed out. In this case, Wiktionary:Grease_pit_archive/2007/March#Issues implementing Template:t in translation sections is the bulk of it. (And, note, this particular issue hasn't come up often, but the others you obliquely refer to may have. [trying to say this as gently as possible:] In general, you might have a better time if you asked why something is some particular way, instead of saying it is somehow wrong, and you know how it ought to be fixed.)
We might very well more the style of the link to CSS, to provide user WT:PREFS customization, but the default style was decided. You might ask on WT:GP if someone can do a bit of CSS. (noting as I said, if the attitude is "this is broken, fix it NOW" you won't get far ;-) We do like improving things. Robert Ullmann 16:32, 10 March 2008 (UTC)
I'm sorry for the snarky comment, Robert. My original remark here was simply to point out a couple of ways in which this may be improved, not as a complaint. I had tried to find relevant discussion first, and it appeared that no one had considered these points. Both problems are only rarely evident (the first with obscure language codes, the second only in Safari), and I thought it possible that no one was aware of them. I would have merely fixed the first myself, if the template weren't protected. I interpreted your reply as "we won't consider any changes, and aren't even interested in discussing why not." I'll try to be less sensitive give my responses more thought.
I have scanned through the extensive Grease Pit discussion you linked about the foreign language link, but there's really nothing about the format there. From combing through the discussion here again, it appears that the superscript format may have been inherited from link text which originally an asterisk, and that it was changed to text with brackets later. But there's no discussion at all about its format, although that may be elsewhere. I'd like to find it, so I can understand the issue. —Mzajac 20:51, 10 March 2008 (UTC)
yes, it seems there isn't a specific link there; please look at Wiktionary:Votes/2007-01/Translations - wiki links (run off) and then it links to a previous poll and to a BP discussion. Robert Ullmann 12:38, 11 March 2008 (UTC)
Thank you. Your link led me to the Beer Parlour archives, where I think I found most of the relevant discussion and the two run-off polls. Since I have them open in browser tabs, I'll link to them here for future reference.
I guess the superscript format was adopted from other-language wikis without discussion. It seems that the parenthesis were added unilaterally for the run-off vote (with a comment that parenthesis were preferred by most commentors, but my count doesn't support that). One commentor mentioned that he thought he might hate [the superscript] less if it looked smooth and modern and professional." There was some opposition to the parenthesis, but not enough to stretch out the already lengthy discussion and voting. I only mention this to establish that the current solution was not chosen by acclamation.
Anyway, if there was any interest, I would still offer some formatting options which haven't been considered, and I believe could be more in line with professional typography and less jarring to the eye. I'd be interested in an incremental improvement, not reopening a can of worms. But it looks like there is consensus support for the current version, and it does fulfil its function. Thanks for your patience. —Mzajac 18:38, 11 March 2008 (UTC)

[edit] Archived discussions regarding the format

  1. 2004-06-18 Interwikis in =Translations=
  2. 2004-09-20 Template for translations ?
  3. 2005-05-31 Interwiki translations in Allow
  4. 2006-10-16 Translation links to sister language dictionaries
  5. 2006-12-07 Translations - wiki links
  6. 2006-12-26 Vote: "Translations - wiki links"
  7. 2007-01-08 Translations could be linked to other-lang Wiktionaries.
  8. 2007-01-18 Vote: Translations - wiki links (run off)
  9. 2007-02-12 Interwiki links in translations: when?
  10. 2007-02-19 Translations - wiki links (run off)

[edit] Extra space

I have built a test case demonstrating the problem no. 1, above, at User:Mzajac/test. The improved template code at User:Mzajac/t can be pasted right into this template {{t}}. —Mzajac 19:16, 11 March 2008 (UTC)

Thanks, Robert. —Mzajac 16:50, 18 March 2008 (UTC)

[edit] Blue t-links are ambiguous

For the past few months I assumed a blue t link meant the word exists in its native Wiktionary just as the red t link means it does not exist. Only now did I realize the semantics of the blue t link are not the opposite of the red link.

  • t- The red t link means "The native Wiktionary has no article on this word".
  • t The blue t link means "The native Wiktionary either does have an article on this word or it has not been checked"!

To me this is very counterintuitive, especially since the bot in charge of these links does know whether the native articles exist or not. I feel strongly that the semantics should be change and a new variant of the template introduced:

  • t- The red t link means "The native Wiktionary has no article on this word".
  • t+ The blue t link means "The native Wiktionary does have an article on this word".
  • t The external link coloured t link means "The native Wiktionary has not yet been checked for the existence of this word".

Since the t variant is the current default, the quickest to type, and the one people are used to using if they haven't checked the native Wiktionary, changing its meaning makes good sense. Since + is the opposite of - it also makes sense for the blue link.

The only other question is regarding the colours of the links. Originally all links were "external link pale blue". Later was introduced "standard HTML red" for t-, a shade which was not the same is standard redlink red and niether a match for standard "external link pale blue". Later I modified the template and computed a shade of red to best match the other link colours already used. At that point I overlooked the different meaning for blue in these links as compared to other links.

I propose therefore to set the red and blue versions of the t links to the standard red and blue link colours. As for the "untested" links, they could revert to "external link pale blue", or they could share one of the "unkown" colours I've used for links in JavaScript extensions such as the citation tab or "ajaxtranslinks.js" which sets an orange colour for links in translation tables where a page exists for the term but has no entry for the correct language.

Opinions? — hippietrail 10:31, 18 March 2008 (UTC)

Note that we do have {{temp|t+}] with the desired semantics. The colours could use a bit of tweaking.
There is also a null form {{}} used by the bot when someone has added {{t}} for a language with no wikt. (Which really isn't necessary, a plain link would be fine.) If the wikt is created later, the bot will change it to one of the other forms. Robert Ullmann 12:21, 18 March 2008 (UTC)

[edit] getting {fpl} and {mpl} to work

I can't seem to be able to pass in {{fpl}} for the {3} parameter as in {{t|es|PUF|fpl}} on FAQ. Any way to add this (and as well {{mpl}}). Or should I leave it as just f? Thanks --Bequw¢τ 15:47, 19 March 2008 (UTC)

Try {{t|es|PUF|f|p}}: PUF es(es) f. pl.. —Michael Z. 17:15, 19 March 2008 (UTC)
Note that {mpl} and {fpl} are both deprecated, should be {{m|p}} and {{f|p}}. (If you use mpl or fpl, they get immediately replaced by AF) Robert Ullmann 07:40, 20 March 2008 (UTC)

[edit] {{t|langcode|translation|g}}?

Does anyone mind if I edit this template (and its littermates) to support a gender of g, which would then transclude {{g|langname}}? (If I'm understanding the code right — obviously I'd want to test first to be sure — all it would take is modifying the |}} at the end to be |g={{g|{{{{#if:{{{xs|}}}|t2|t-sect}}|{{{1|}}}|{{{xs|}}}}}}}}}, i.e. mostly just copying over the section-link code.) —RuakhTALK 23:51, 8 September 2008 (UTC)

It wouldn't be easier just to follow the template with {g|language} when needed? Robert Ullmann 05:38, 9 September 2008 (UTC)
By that token, wouldn't it be easier just to follow the template with {{m}} (or the like) when needed? (I actually don't understand why the gender stuff is incorporated into the template that way, but if we're going to do it, {{g}} actually seems like the one it's most useful for, because that way the template can handle the standard language name and everything.) —RuakhTALK 11:44, 9 September 2008 (UTC)
Yes, there isn't much reason other than just having it as one template, this being a bit less noisy.
However, note that the existing {t} does not reference {{m}} unless m is in the "call". Since the template language evaluates all branches of an if or switch, your code will cause {{g}} to be referenced and expanded for every use of {t}. (!)
we could do this a bit better: |g={{{{{3}}}|lang={{{1}}}}} and "teach" g to take lang=code. Using {3} instead of g prevents calling g all the time; if {3} is (for example) "m", it will do a redundant call to {m}, but that is no overhead, as it will be retrieving template:m anyway. At the same time, better to have {g} re-expand t-sect only when it is used, rather than on all calls to {t}. What do you think of all that? Robert Ullmann 12:49, 9 September 2008 (UTC)
Yeah, sure, fine, whatever. :-)   —RuakhTALK 14:59, 9 September 2008 (UTC)

[edit] Strange bug

There is a some bug on that page: value (translations -> the degree of importance you give to something -> Russian). Can anybody fix it? -- 4th-otaku 09:14, 1 November 2008 (UTC)

There was a Roman letter mixed in with the Cyrillic. Fixed. —Stephen 17:07, 1 November 2008 (UTC)

[edit] hiragana/katakana/romaji and maybe a parameter for a translation comment

Hi,

When I try to convert from the previous standard towards the t template way of doing things, I'm finding I can't encode Japanese translations that have also hiragana listed. Romaji probably belongs with tr, but could there maybe be another parameter for hiragana? Hippietrail probably knows best what a good name for it would be. The previous unsigned comment was made at 2008-11-15T07:44:36+00:00 by user:Polyglot.

I wholeheartedly agree with Polyglot. For mostly ideographic Taiwanese Chinese with w:Bopomofo to mostly phonetic Korean with w:Hangul, including mixed system Japanese with w:Kana, Roman characters may be used as a standard representation for pronunciation but the original phonetic script is important in referring to alphabetized directories like dictionaries, encyclopædiae, telephone books, and such.

Beyond this, the best transliteration system for English-based novices rarely picks up the nuances and regular patterns that are vital to understanding the language and are rarely one-to-one making back-translation ambiguous at best. Cf. w:ISO/TR 11941 v. w:McCune-Reischauer romanization, w:ISO 3602 v. w:Hepburn romanization, w:ISO 9 v. w:BGN/PCGN romanization of Russian. Fortunately, w:BGN/PCGN has used w:ISO 7098 pinyin for awhile, abandoning systems that half included many w:Wade-Giles place names like Pei-ching and reliquary ones like Peking, in favour of w:Běijīng.

Furthermore, adding one extra parameterallows for, say, w:UNGEGN v. w:ISO 233 w:Romanization of Arabic, or vocalized v. non-vocalized. I have had many friends find difficulty with pronunciation because of the gap between Germanized Hebrew and native English pronunciation or even with government identification when moving between formerly French Arab countries to the Anglosphere. Back to Japanese, the w:okurigana system can vary markedly from user to user so a kana transliteration can provide a vital fall-back for real-life situations. In the end, just a native script and English transliteration are insufficient for a top-end global dictionary. :)--Thecurran 15:04, 16 January 2009 (UTC)

You are overthinking this (as regards the template parameter itself ;-). tr= just means "whatever we put in the parenthesis". For Hiragana and Rōmaji, you just use tr=[[hiragana]], rōmaji. (Noting that neither is a "transliteration", they are both script forms of Japanese ;-) If you want to show others, then do that; the template isn't sentient, it doesn't "know" what "tr" might mean; it just "knows" to put that in the parenthesis, eh?
However, translations tables should not be in the business of providing multiple transliterations; that belongs in the entry for the word. Robert Ullmann 15:19, 16 January 2009 (UTC)

[edit] translation comment

I really like the t template, because it groups everything of a translation together, the language, the script, etc. What's missing is the comment that's sometimes found between parentheses after a translation like archaic, only in a certain region, only for specific senses, etc. Could that also be put in a parameter?

Just use {{qualifier}} after the template and whatever, as anywhere else this is done. Robert Ullmann 15:10, 16 January 2009 (UTC)

[edit] Categories

Please add this one to Category:Translation templates. Thanks in advance
--Jerome Potts 19:37, 7 June 2009 (UTC)