Template talk:Verse translation

(Redirected from Template talk:Verse translation/doc)
Latest comment: 10 days ago by Nakonana in topic Wrapping on mobile

Width is not set edit

Hello,

the (column) width of the table is not set.

It could be better:

Peru, with the treaty, sought to protect its rich nitrate fields in Tarapaca, but not only that, it sought to impede the competition of the Bolivian saltpeter produced by Chilean and British investors. (Orig. Spanish:) El Perú, con el tratado, buscaba que resguardar sus ricas salitreras de Tarapacá; pero no sólo ello, sino apuntaba también, a impedir la competencia del salitre boliviano que se encontraba en poder de los capitales chilenos y británicos.

...

Alejandro Reyes Flores in "Relaciones Internaconales en el Pacífico Sur", page 110

--Keysanger (talk) 10:01, 18 September 2016 (UTC)Reply

I have the same problem! Fixed width of 50% would be good! C-Kobold (talk) —Preceding undated comment added 19:35, 23 February 2019 (UTC)Reply

Improper indentation edit

I've written about this at length in an essay, but the colon should not be used to indent text. The syntax is strictly for definition lists, it pollutes the HTML which reduces accessibility, and is semantically incorrect. It is far more appropriate to use CSS in a template and the documentation here even notes an equivalent. Better yet, the template should instead be enclosed in the <blockquote> tag instead as that is much more semantically appropriate and would automatically format the verse alike with other quotes. Opencooper (talk) 06:24, 12 February 2017 (UTC)Reply

This template uses <poem> tags, which translate colons into spaces. The wikitext looks like it has deflist definitions without corresponding deflist terms, but the resulting HTML does not. I agree that it ought to use <blockquote> for semantic reasons. Hairy Dude (talk) 03:52, 22 January 2019 (UTC)Reply

Documentation: Full example edit

Perhaps some line breaks should be added to the "Full example" so that the "Markup" does not overlap with the "Renders as", making them both illegible. Hyacinth (talk) 03:16, 10 September 2018 (UTC)Reply

I'm not seeing that issue viewing with Chrome 68. Ibadibam (talk) 22:09, 11 September 2018 (UTC)Reply

Use in Gevninge helmet fragment edit

Would someone please look at Gevninge helmet fragment#Context and Beowulf and see if this template is displaying correctly? It used to for me, but as I see it now (in both Firefox and Chrome) the Old English text is lumped together into two paragraphs; the line breaks only appear for the English translation. The same template displays fine for me in such articles as Benty Grange helmet#Boar-crests in Beowulf and Sutton Hoo helmet#Beowulf. Thanks, --Usernameunique (talk) 16:21, 26 September 2018 (UTC)Reply

It was using an embedded {{lang}} template rather than this template's native language parameter. I switched it and it seems to display correctly now. I also moved the image that collides a bit with the columns on my display--feel free to move it back if it looks wrong. Ibadibam (talk) 23:46, 26 September 2018 (UTC)Reply
That looks great, thanks Ibadibam. Moved the photo to a new place, where (at least on my computer) it fills in the space on the right of the screen next to the Beowulf lines. How does it look on your screen? If it still bumps up, we can either add back the upright parameter or move the image back to #Discovery. --Usernameunique (talk) 01:16, 27 September 2018 (UTC)Reply
Happy to help! I was using an older display today that tends to crowd every web page, so I'm sure the image is where it ought to be now. Ibadibam (talk) 02:49, 27 September 2018 (UTC)Reply

Indentation on mobile edit

The documentation states that "The indentation provided automatically in this template is approximately equal to <blockquote> and <poem>". There are three ways in which this sentence is misleading:

  1. It is not semantically equal to <blockquote>;
  2. On mobile, this template doesn't provide any indentation;
  3. On mobile, <blockquote> is not merely indentation: there's a dark grey stripe on the left, and font size is increased, which makes them visually distinct.

The template ought to remove the indentation so that a <blockquote> can be added manually, or else add one automatically. Hairy Dude (talk) 03:57, 22 January 2019 (UTC)Reply

In addition, the side-by-side presentation is inappropriate for narrow screens because each column ends up being too narrow. Hairy Dude (talk) 04:07, 22 January 2019 (UTC)Reply
I'm not sure that the blockquote tag is semantically appropriate, since the template contains not one, but two quotations. It would be semantically correct to apply the tag separately to both the original text and the translation, but that wouldn't work well within a table. Anyway, the real problem, as you have pointed out, is that this template doesn't behave well on mobile, so it sounds like we need a way to make the template more versatile. Ibadibam (talk) 06:09, 22 January 2019 (UTC)Reply
I wonder whether columns might be a more appropriate way to accommodate mobile display. Ibadibam (talk) 21:50, 7 February 2019 (UTC)Reply
I agree that The template ought to remove the indentation and that using table columns for the side-by-side presentation is sub-optimal. Instead, style="float:left;" should be added to each <poem>...</poem>, with a terminating {{Clear|left}}, of course. -- Michael Bednarek (talk) 05:29, 8 February 2019 (UTC)Reply
You know what would be cool on mobile, would be some sort of lightbox control so the user could swipe between the original and the translation. Ibadibam (talk) 17:02, 30 August 2019 (UTC)Reply

verse with prose translation edit

 
Illustration of the issue...

So I have run into a situation at Nestor's Cup (mythology) and could use some advice.

I want to quote part of the Iliad with a translation, and this template seemed like the correct way to do so. However, because the translation is in prose, the text of the translation squashes the original over to the side, which results in each line of the poem being shown over two lines (on my 1080p screen, full screen, as a logged-out user with default settings: different skins and window sizes change this). If the window is big enough, it would obviously be desirable that this not occur.

  • Is there a way to avoid this with {{verse translation}}?
  • Is there an alternative template which will do what I want?

The two obvious work-arounds are to use a different translation which is in verse (possible in this case, but not necessarily always, and there is not always an equivalently good verse translation available), or to insert artificial line breaks into the translation (which, depending on where the line breaks are, leads to different effects at different window sizes, and seems generally undesirable...) Caeciliusinhorto (talk) 17:33, 5 September 2019 (UTC)Reply

The obvious solution is to use a table with a width constraint on the prose column. -- Michael Bednarek (talk) 02:58, 6 September 2019 (UTC)Reply
In other words, there is no solution using the template itself, short of adding a parameter to allow overriding the template's table style. Right? Ibadibam (talk) 05:28, 6 September 2019 (UTC)Reply
@Michael Bednarek: Thanks for the information, and for this edit, which is a clear improvement. @Ibadibam: That is my understanding, yes. Caeciliusinhorto-public (talk) 08:25, 6 September 2019 (UTC)Reply

Capability (or equivalent template) for more columns? edit

This is a very useful template! Is there an equivalent template that handles three or four columns, or is it possible to extend this one to do so? There are some articles with beastly (and error-laden) markup that could use such a thing. pauli133 (talk) 13:06, 23 December 2019 (UTC)Reply

Not that I know of, but it certainly would be helpful for non-Latin-alphabet text where we want to provide a romanization in addition to translation. Ibadibam (talk) 04:47, 30 December 2019 (UTC)Reply
@Pauli133: As the originator of this template, while I still think it's very useful (and thank you for saying so!), I am increasingly sad that it's not robust enough to handle tight situations well -- that is, either the verses are very wide or the available screen space is very narrow. Perhaps someone can improve its functionality along these lines, but probably not me. This is all to say that any structure like this, but with more columns, will likely just look funky under even more screen conditions, so I'd tend to warn against it. However, I will leave you with this "four-square" version, which I once pitched, but didn't happen to be used for the article in question. It's still just this same 2-column template, but clearly displays 4 distinct but related elements. Maybe something like this would be of use to you?
Cheers. Phil wink (talk) 23:58, 30 December 2019 (UTC)Reply
Thank you, I'm looking forward to trying that out! pauli133 (talk) 18:13, 31 December 2019 (UTC)Reply
In case people haven't seen it yet, there's the Template:verse transliteration-translation for non-Latin-alphabet text to provide a romanization. Nakonana (talk) 14:01, 9 December 2023 (UTC)Reply

Wrapping class edit

It would be nice if this template could use an HTML class for its content so that users could style it in their CSS or userscripts could target it, etc. Something like {| class="verse-translation" maybe? Opencooper (talk) 15:39, 17 July 2020 (UTC)Reply

Mobile viewing edit

When browsing Wikipedia on mobile, I have seen this template break the poem text into unreadable, narrow strips. Because of the wide usage of this template, and of mobile Wikipedia, I think this is a urgent issue. I was planning to fix it by making the poems stack vertically under a certain width, using media queries and template styles to restyle the td elements as blocks. However, I realised this would not work for poems with attributions, because the cell for attr1 would end up in the wrong place, wedged between the translation and attr2. Does anyone have any other ideas for how to deal with this? A temporary solution might be to implement this only for instances without poem attribution. --small jars tc 19:26, 27 June 2022 (UTC)Reply

I'm going ahead with the temporary solution. --small jars tc 09:27, 4 September 2022 (UTC)Reply

Block styling works! The only issue left is that it looks the same as surrounding text. Did a temporary fix by giving it a tiny bit of padding, but personally I would prefer something like a combination of <blockquote>...</blockquote> and {{Flex columns}}. Artoria2e5 🌉 00:41, 25 November 2022 (UTC)Reply

@Artoria2e5: I'm concerned about using flexbox, because that's exactly what template:text and translation does, and the resulting layout seems to be unpopular, probably because it includes too much wasted space on desktop. Even prose translations tend to use this template, originally meant just for verse, instead. (Compare the transclusions of text and translation and verse translation) –small jars tc 10:46, 26 November 2022 (UTC)Reply

Wrapping on mobile edit

The verse in this is, unfortunately, somewhat broken in mobile browser view, as in: if the translated text is longer/has more lines than the original text then the original line and the corresponding translated line are "misaligned" in that they are not next to each other/not in the same row. Like this:


Original   Translation
Verse1 Translation1
Verse2 Translation2 which is long and
Verse3 "bleeds" into the next row and thus breaks the verse
Translation3



Here's an example in an article: Straja Țării. Open the article via mobile browser to see the problem. Nakonana (talk) 14:24, 9 December 2023 (UTC)Reply

@Nakonana: I made an effort to fix this in the majority of cases, and maintained it against various careless changes people were making for several months. I'm basically gone now and it seems the template has been screwed up again, but if you want to fix it, the easiest way would be to roll back all changes on both the stylesheet and the template to the point when I last did so, then check the undone changes in case they were anything important. If this doesn't start working after a few cache refreshes, it's proably the fault of changes to other templates this one depends on, and the easiest route would be to give up. small jars tc 20:29, 13 April 2024 (UTC)Reply
@SmallJarsWithGreenLabels Thanks for your reply. Unfortunately I'm not familiar enough with templates and such to be able to judge which changes were important and which were not. But maybe someone more proficient than I will come by and see this and then hopefully implement the suggested solution. It is just a aesthetical issue, so, nothing urgent. It can wait :) Nakonana (talk) 12:23, 21 April 2024 (UTC)Reply