Module talk:Quotations

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This isn't suited for quoting newspapers. Where does the newspaper name go? Should the date, e.g. 02.12.2012, be added with the parameter year=? --Vahag (talk) 11:42, 30 December 2013 (UTC)Reply

From what I understand, this is for citing classical texts, such as Homer, Shakespeare, the Bible, etc. --WikiTiki89 16:17, 30 December 2013 (UTC)Reply
Well, yes and no. It was built with my needs in Ancient Greek in mind, and so it is of course naturally skewed towards those needs, but I would like to make it as general purpose as practical. It is truly my ambition to make this the one-stop template for all quotations. That being said, it is possible that such a lofty goal is a pipe dream. Could you give me an example of a template which does newspaper citations well, or simply one well-formatted by hand? I'd be happy to look into the possibility of expanding. -Atelaes λάλει ἐμοί 04:04, 31 December 2013 (UTC)Reply
{{quote-news}} does newspaper citations well. --Vahag (talk) 13:07, 31 December 2013 (UTC)Reply

Do you plan on adding functionality for the actual text of the quotations, or is this meant to be solely a reference template? DTLHS (talk) 04:58, 31 December 2013 (UTC)Reply

It should already support text. That's what {{{quote}}}, {{{trans}}}, etc. are for. Admittedly, I haven't used it (and thus haven't tested it) much, but it should work. -Atelaes λάλει ἐμοί 05:52, 31 December 2013 (UTC)Reply
I think you two should collaborate and create one quotation-usex-reference übertemplate which merges the functionality of everything in Category:Citation templates. --Vahag (talk) 13:07, 31 December 2013 (UTC)Reply

Bugs[edit]

I am going to report bugs under this header.

  • If I omit the 2nd numbered parameter, the name of the author, a trailing comma appears.
    I am sorry about that; I was certain that I had fixed that particular problem. I am unable to duplicate it, however. Could you possibly point me to an example, or give me some code which produces it? Thanks. -Atelaes λάλει ἐμοί 23:44, 3 January 2014 (UTC)Reply
    This is the code. --Vahag (talk) 00:22, 4 January 2014 (UTC)Reply
    Fixed. -Atelaes λάλει ἐμοί 07:27, 5 January 2014 (UTC)Reply
  • Date ranges should be indicated by an en dash. So 800–600 BC, not 800-600 BC. --Vahag (talk) 23:31, 3 January 2014 (UTC)Reply
    I apologize if this comes off as flippant or rude, but I've never taken the time to sort out these typological issues, and don't really intend to at this time. I recognize that there are schools of thought on which dash and quote to use in which situations, but I've just never made it a personal priority. If someone sees errors of this nature and decides to correct them, I will most certainly not resist it in any way. However, to be blunt, I just don't care myself, and will not make such corrective actions myself. Sorry. -Atelaes λάλει ἐμοί 23:44, 3 January 2014 (UTC)Reply
    I was going to fix it, but I can't do that until you merge the module into one place. This duplication is ridiculous and since you're currently the only one who understands the module and you refuse to let anyone help you with it, it's hard for other people to come in and fix bugs for you. --WikiTiki89 23:51, 3 January 2014 (UTC)Reply
    Wow.....that was a bit more aggressive than I was expecting. For starters, I don't see how the duplication has anything to do with this particular issue. All of the dates are hard-coded into the data sets. Whether we have language-specific logic modules or not doesn't affect it, that I can see at least. Also, I wasn't trying to refuse anyone's help, and I apologize if I did so. When documentation was asked for, I gave it, and then asked if anyone had any further questions. I'm happy to explain this to anyone who is interested. -Atelaes λάλει ἐμοί 23:57, 3 January 2014 (UTC)Reply
    You seem to be ignoring me every time I ask you to list what customizations you have in mind that require separate data modules. You ignored my question as to whether it is absolutely necessary to be able to abbreviate the Odyssey and Iliad. What this has to do with this case, is that if I had already gone and created submodules for various languages, I would have to fix this same bug in all of them. Luckily, we only have two right now, but I think it is pointless to fix bugs until the modules are merged. --WikiTiki89 00:19, 4 January 2014 (UTC)Reply
    Sorry if I sounded too harsh, I'm just a bit frustrated by this. I'm going to try to start merging these modules now, let me know if I break anything. --WikiTiki89 00:31, 4 January 2014 (UTC)Reply
    Date ranges should probably be defined explicitly in any case. DTLHS (talk) 00:36, 4 January 2014 (UTC)Reply
    The modules are merged and the date-range dash is fixed. --WikiTiki89 01:01, 4 January 2014 (UTC)Reply
  • Bug: {{Q|grc|Pl.|R.|370b}} yields "Module:Quotations:210: attempt to compare number with nil". (Substituting Ap. for R. works; something's wrong with the Republic.) (EDIT: This also affects Lg. ["Laws"]) ObsequiousNewt (ἔβαζα|ἐτλέλεσα) 02:01, 15 August 2014 (UTC)Reply

Improving the module[edit]

Fair enough. The reason I didn't respond to your question on what features I wanted was because I didn't really know at the time. After giving it some thought, I have a few things. First, I'd like to have some sort of decision-making process possible in the reference link mapping. So, for example, there are two major numbering schemes for Aristotle's works, Bekker numbers, and an older system which treats each work separately, which, to my knowledge, is unnamed. The reference I typically use (LSJ 8) uses the older system, and so this is what I've initially designed the module to work with. However, Bekker numbers are ultimately better, and should be supported. The problem is that the two systems would require separate logic sets to parse. I'd like the module to be able to look at the inputs, figure out which system the user is likely intending, and then follow the logic for that system. A second feature that I'd like to add is some sort of redirects. The alias system is reasonably powerful, and I'm happy with its performance, but there are situations where it's not enough. For example, what if there's a work which is commonly counted in the corpus of one author, but modern research has determined that it's actually the work of another. I'd like the logic system to get to a point where it finds the instructions: "Restart the whole lookup process using the following parameters, instead of what the user gave you." This would, of course, provide a solution to the Iliad and Odyssey problem, as we could simply have author-level redirects which set {{{2}}} to "Homer", and reinsert the rest of the numbered parameters back a slot. It could also be useful for works whose author isn't as well known. I'm willing to bet that more people know the title of the book "Acts" from the New Testament than know who wrote it. It'd be nice if you could simply skip the author, and have the engine find it for you. Thirdly, after considering the different formats required for modern works (magazines, video games, web pages, etc.), I'm thinking all the parameters should be nameable, but I'd like to keep the option for leaving the basics numbered. So...essentially {{Q|grc|Homer|Iliad}} and {{Q|grc|author=Homer|work=Iliad}} would work the same. This makes input faster and easier for the majority of historical works, but adds the requisite precision for modern works. That's all I've got at the moment. And, to be clear, I'm not asking anyone to build them for me. If someone wants to, that's fantastic, but otherwise I'll do it when I have the energy and mental clarity (I'm feeling rather under the weather at the moment, and so am sticking with more routine tasks). -Atelaes λάλει ἐμοί 01:37, 4 January 2014 (UTC)Reply

Essentially, any feature you want for one language, can also be useful in other languages, so there should just be a way to do it from the data module. Redirects can be done purely in the data module like this:
data['Some Guy'].works = {['Some Work'] = data['Some Other Guy'].works['Some Work']}
And I still want to know, on a scale from "absolutely impossible to live without" to "completely useless", how necessary is the ability to abbreviate and/or leave out the author from the Odyssey and Iliad? --WikiTiki89 01:54, 4 January 2014 (UTC)Reply
I've decided to be obstinate about it, so let's consider it essential. Besides, that solution isn't as powerful as I want it to be. It doesn't rewrite all the author data, for example. And again, I'm not asking you to do it for me, so if you don't feel like doing it, don't worry about it; I'll get to it. -Atelaes λάλει ἐμοί 02:04, 4 January 2014 (UTC)Reply
But why have you decided to be obstinate? That's all I want to know. I already feel more comfortable now that the code is all merged. I was just worried that people would want to start adding other languages which would have made the problem unmanageable. --WikiTiki89 02:19, 4 January 2014 (UTC)Reply
And when you do come up with a solution, make sure it's one that can be done mostly with just the data module, such as:
data['Some Guy'].works = {['Some Work'] = createRedirectObject(data['Some Other Guy'].works['Some Work'])}
--WikiTiki89 02:22, 4 January 2014 (UTC)Reply

Recent additions[edit]

@Atelaes. Your recent additions don't conform to my customization convention. You need to fix lines like this:

sema.reroute = function(route)

to this:

sema.reroute = sema.reroute or function(route)

That way, the language modules can customize these functions if necessary. --WikiTiki89 03:38, 5 January 2014 (UTC)Reply

Module:Quotations/xcl/data[edit]

What am I doing wrong? It's not working. See տզրկաձեւ. Two more questions. Is automatic transliteration planned? The function is available in {{usex}}. How can I add the publisher, publication place and year? See WT:QUOTE for the format of such information. --Vahag (talk) 18:36, 6 January 2014 (UTC)Reply

You forgot to do this. Ideally, that should not be necessary. --WikiTiki89 19:05, 6 January 2014 (UTC)Reply
I'm ok with it, actually. The creation of a language's module is no trivial action, and not one oft repeated. The hard-coded list prevents an expensive "if-exists" call. However, perhaps the requirement of adding one's language to the list should be better documented. -Atelaes λάλει ἐμοί 06:30, 7 January 2014 (UTC)Reply
It's not expensive if it's done rarely. You don't even need an "if-exists", you can just load the module assuming it's there; if it's not there, there will simply be a script error. --WikiTiki89 18:54, 7 January 2014 (UTC)Reply
OK, but now there is a trailing comma in տզրկաձեւ. Yet another feature request: an ability to give the title in the original language and separately in translation. Most of Old Armenian works do not have a common English name, so the original name is important. --Vahag (talk) 19:18, 6 January 2014 (UTC)Reply
I have fixed the trailing comma issue. I don't quite understand how you'd like this multiple title to work. Could you possibly offer an example? -Atelaes λάλει ἐμοί 06:30, 7 January 2014 (UTC)Reply
Thank you for fixing the comma. The translation of the title would appear in square brackets after the transliterated original title. Wikipedia's w:Template:Citation provides such functionality through the parameter trans_title. You can view the result in references [4], [6], [7] of this article. If the original title and its translation are defined separately for each work, then maybe an automatic transliteration could be applied to the original title. See ակութ (akutʻ) for a problem I'm having.
And please do not forget the functionality for adding the publisher, publication place and year. Without such bibliographic data the references are useless for many Armenian works, as the text, chapters and pages vary from publication to publication. --Vahag (talk) 09:48, 7 January 2014 (UTC)Reply

@Vahagn Petrosyan, Wikitiki89, Erutuon: Could we actually get transliteration though? It would be much appreciated. —JohnC5 20:22, 3 June 2017 (UTC)Reply

@JohnC5: As in, transliteration of the quote? — Eru·tuon 20:25, 3 June 2017 (UTC)Reply
@Erutuon: Yep! For instance at ἰσχίον (iskhíon). —JohnC5 20:30, 3 June 2017 (UTC)Reply
@JohnC5: Oh, okay. I guess the names of the author and the work are typically translated or transliterated already. I'll see what I can do. — Eru·tuon 21:02, 3 June 2017 (UTC)Reply

Okay, now we have the following.

{{Q|grc|Il.||5|305|quote=τῷ βάλεν Αἰνείαο κατ᾽ ἰσχίον, ἔνθα τε μηρὸς
ἰσχίῳ ἐνστρέφεται, κοτύλην δέ τέ μιν καλέουσιν|trans=[he smote Aeneas] on the hip, where the thigh turns in the hip joint,—the cup, men call it|transyear=1924|transauthor=Murray}}
800 BCE – 600 BCE, Homer, Iliad 5.5
τῷ βάλεν Αἰνείαο κατ᾽ ἰσχίον, ἔνθα τε μηρὸς
ἰσχίῳ ἐνστρέφεται, κοτύλην δέ τέ μιν καλέουσιν
tôi bálen Aineíao kat iskhíon, éntha te mēròs
iskhíōi enstréphetai, kotúlēn dé té min kaléousin
  • 1924 translation by Murray
    [he smote Aeneas] on the hip, where the thigh turns in the hip joint,—the cup, men call it

Suggestions on layout are welcome. — Eru·tuon 21:36, 3 June 2017 (UTC)Reply

@Erutuon: Thanks so much. This has bothered me a few times now. Would it be possible to indent the transliteration? I think that would help with legibility. —JohnC5 21:57, 3 June 2017 (UTC)Reply
  • 800 BCE – 600 BCE, Homer, Iliad 5.5
    τῷ βάλεν Αἰνείαο κατ᾽ ἰσχίον, ἔνθα τε μηρὸς
    ἰσχίῳ ἐνστρέφεται, κοτύλην δέ τέ μιν καλέουσιν
    tôi bálen Aineíao kat iskhíon, éntha te mēròs
    iskhíōi enstréphetai, kotúlēn dé té min kaléousin
    • 1924 translation by Murray
      [he smote Aeneas] on the hip, where the thigh turns in the hip joint,—the cup, men call it
There you go. I agree, it does make it easier to distinguish the transliteration from the original. — Eru·tuon 22:02, 3 June 2017 (UTC)Reply

@Erutuon Thanks for adding transliteration! This is an important improvement. --Vahag (talk) 07:51, 4 June 2017 (UTC)Reply

Add links in quote text?[edit]

Should be easy enough to do... could we wikilink existing words in quote text? ObsequiousNewt (ἔβαζα|ἐτλέλεσα) 23:28, 14 December 2014 (UTC)Reply

You are permitted.
  1. c. 37 BCE – 30 BCE, Virgil, Georgics 4.265:
    [] ultro / hortantem et fessas ad pabula nota vocantem
    [] freely / calling them and exhorting the weary insects to eat their familiar food.

DTLHS (talk) 23:33, 14 December 2014 (UTC)Reply

Sorry, I meant code the module to do it automatically. ObsequiousNewt (ἔβαζα|ἐτλέλεσα) 03:19, 15 December 2014 (UTC)Reply

Variations in link format for the same ref[edit]

I added a bunch of anchors to the books of Thucydides on Greek Wikisource, so that passages can be linked to at a finer level: Thucydides, History of the Peloponnesian War 1.1.1, for instance, rather than simply Thucydides, History of the Peloponnesian War 1.1. Many references to Thucydides in Ancient Greek entries probably only give two numbers: the book and section (or whatever the second number is). Others also give a sentence number (if that's what the third number is). Is there some way to make the first reference above link to the anchor #p1.1 while making the second reference correctly link to #p1 (not #p1.)? — Eru·tuon 06:30, 15 January 2017 (UTC)Reply

I've implemented this feature myself. — Eru·tuon 18:43, 8 March 2017 (UTC)Reply

Unfortunately, my changes have broken the generation of anchors in certain cases. I haven't figured out how to fix it yet. — Eru·tuon 02:28, 21 December 2017 (UTC)Reply

Manual translit[edit]

Having a manual transliteration parameter would be useful for languages like Hittite and Old Persian. —Aryaman (मुझसे बात करो) 15:35, 17 September 2017 (UTC)Reply

Agreed, this would be very useful. — Vorziblix (talk · contribs) 13:23, 23 November 2018 (UTC)Reply

 Added |tr=.. — Eru·tuon 16:09, 23 November 2018 (UTC)Reply

@Erutuon: Many thanks! It seems to work for most languages, but for whatever reason not for Egyptian; compare:
I’m not really sure what’s going on here.Vorziblix (talk · contribs) 01:21, 24 November 2018 (UTC)Reply
Ah, I see. The module is interpreting the hiero tags as Latin script and so refusing to transliterate, as not require("Module:script utilities").is_Latin_script(sc) isn’t fulfilled. I suppose Egyptian is a special case in this regard, in that it needs to have both a ‘Latin’ script original text (really hieroglyphic) and a transliteration at the same time. I’ll hard code this exception in as a temporary fix, but if you know of a more elegant solution, by all means change it. Thanks again for your work! — Vorziblix (talk · contribs) 02:19, 24 November 2018 (UTC)Reply
Yes, basically. MediaWiki actually translates the hiero tags into a strip marker, similar to "\127'\"`UNIQ--hiero-00000008-QINU`\"'\127", and that is detected to be Latinx because it contains several Latin characters. It would be neater to search for the hiero tag strip marker, but not really necessary at this point if Egyptian will always be using hiero tags. (Probably findBestScript should be fixed though.) — Eru·tuon 05:36, 24 November 2018 (UTC)Reply

Italicized work[edit]

I'd like to change the format used in |form=work from "Ṛgveda 1.068.10" to "Ṛgveda, 1.068.10". is either change amenable to people? @Erutuon, DTLHS, Wikitiki89? --Victar (talk) 05:11, 23 November 2018 (UTC)Reply

Seems fine to me. DTLHS (talk) 05:17, 23 November 2018 (UTC)Reply
OK, I've removed the italicization from |work= in |form=work. --Victar (talk) 09:05, 23 November 2018 (UTC)Reply
Why? I think style guides usually recommend that names of works be italicized. — Eru·tuon 15:52, 23 November 2018 (UTC)Reply
And I would agree with you for the most part, except in the case of authorless works. --Victar (talk) 16:13, 23 November 2018 (UTC)Reply
Well, okay. I think a parameter to turn off italicization would be a better solution, because most cases of {{Q|form=work}} are for authored works (search query: hastemplate:Q insource:/\{\{Q\|[^}]+form=work/). — Eru·tuon 16:22, 23 November 2018 (UTC)Reply
I'd be OK with a parameter instead. --Victar (talk) 16:28, 23 November 2018 (UTC)Reply
@Victar I’ve implemented a format= parameter with possible values ‘no’ for an unitalicized title, ‘q’ for a quoted title, and anything else for an italic title (the default). It can also be set for individual works in the data module, so you can set any authorless works you want to be unitalicized by default. — Vorziblix (talk · contribs) 18:06, 24 November 2018 (UTC)Reply
Thanks, @Vorziblix, that works perfect for my needs. I'm wondering though if we should call the parameter something else, since we already have |form=. Perhaps |style=? --Victar (talk) 23:43, 24 November 2018 (UTC)Reply
@Victar: Sure; I couldn’t think of any good names for it myself. Feel free to change it to anything you think is clear. — Vorziblix (talk · contribs) 00:02, 25 November 2018 (UTC)Reply
Done, thank! --Victar (talk) 04:32, 25 November 2018 (UTC)Reply

Something's broken[edit]

Lookie: https://imgur.com/eACyMjl

-- Bhagadatta (talk) 02:22, 2 December 2018 (UTC)Reply

@Bhagadatta: Fixed. (It's usually better to give a link to the page, in this case योक्त्र.) — Eru·tuon 02:50, 2 December 2018 (UTC)Reply

External links for reflink[edit]

I know it's not ideal, but there are sources that aren't on wikisource or any other wiki. This seems to make the assumption of [[ reflink | refdisplay ]] not valid for external links (unless there's a syntax for external links with double brackets that I'm missing). Does anyone particularly object if I add that capability? --Robert.Baruch (talk) 01:16, 26 July 2019 (UTC)Reply

|ts=[edit]

@Erutuon, Vorziblix, Benwing2: Can someone please add support for |ts=? Also it would be nice if bolded text in |quote= showed up as such in the automated transcription. See 𐎠𐎼𐎭𐎿𐎫𐎠𐎴 (a-r-d-s-t-a-n). Thanks! --{{victar|talk}} 03:42, 5 October 2020 (UTC)Reply

@Benwing2 Should probably be able to get to this tomorrow. Benwing2 (talk) 03:53, 5 October 2020 (UTC)Reply
👌 --{{victar|talk}} 03:59, 5 October 2020 (UTC)Reply
@Victar I fixed the support for |ts=. The other issue is specific to Module:peo-translit and will require some additional work. Benwing2 (talk) 04:09, 6 October 2020 (UTC)Reply
@Benwing2: Thanks! Huh, I could probably get working if it's to do with the translit module. Thanks again. --{{victar|talk}} 04:21, 6 October 2020 (UTC)Reply
@Victar Yeah. I tried adding a trivial mapping for "'" to the translation table but then you get hyphens between the single quotes. You need to special-case the single quote when adding hyphens. Benwing2 (talk) 04:26, 6 October 2020 (UTC)Reply
@Benwing2: Hey, saw your edit to get this working. Thanks a bunch! --{{victar|talk}} 01:23, 7 October 2020 (UTC)Reply

Referencing Critical Editions[edit]

Is Q of any use in formatting a reference such as:

    • c. 200–600 CE, Hāla, Gāhā Sattasaï[1], section 162; republished as Albrecht Weber, editor, Das Saptaçatakam des Hâla, Leipzig, 1881:
      2009 translation by Peter Khoroche and Herman Tieken

I can't work out how to do it. I started adding a section in Module:Quotations/inc-pra/data for works by Albrecht Weber, but then realised I only had an explanation of how to compose links. This could be useful in generating a link to the relevant page. I also want to be able to quote that Prakrit text in three forms:

  1. The form given in the critical edition, which is in the Roman script.
  2. The reconstructed Brahmi script form (the quotation would support a word in Brahmi script).
  3. The transliteration of the latter (but this is not essential)

Can I use the quotations module to manage this? --RichardW57 (talk) 09:17, 11 June 2022 (UTC)Reply

Brackets[edit]

How much would it take for the |brackets=on functionality of {{quote-book}} to be implemented here as well? Catonif (talk) 14:30, 10 April 2023 (UTC)Reply

grc changes[edit]

@JoeyChen Some of your recent edits appear to have broken the template/module. I'm getting an error message at σπευστικός that I don't get when I use the version of Module:Quotations/grc/data from 25 May. —Mahāgaja · talk 18:04, 5 July 2023 (UTC)Reply

Title & Author for non-Latin Script Languages[edit]

@Erutuon, Theknightwho For non-Latin script languages, is it possible to display both the native script and a romanisation at the same time for the title of the work and author? It seems that only one of the two is possible in the current configuration. For example, at فرمان there is:

  • 1564, حَسَن شَوقِی (hasan śauqī), مِعْراج اُلْعَاشِقِین (mi'rāj ul'āśiqīn), page 82:

This may be one reason why CAT:Urdu terms with quotations does not use this module. /vah/data and /inc-mgu/data use Devanagari for the work title and author, while other data modules such as /inc-pra/data and /omr/data use romanisation for the work title and author. Kutchkutch (talk) 20:23, 25 January 2024 (UTC) @Benwing2 Kutchkutch (talk) 20:50, 25 January 2024 (UTC)Reply

I've been meaning to raise this myself. At the moment, we tend to only give romanisations for the title, which seems like a really bad idea to me, since it makes it much harder to track down the original work. I don't mind if we display a transliteration, but we definitely should be giving the actual name of the work. Theknightwho (talk) 20:41, 25 January 2024 (UTC)Reply
@Kutchkutch @Theknightwho This module needs a lot of work in general, to bring it up to par with Module:quote. It would be great, for example, if it used Module:quote as the underlying quote implementation (or at least Module:usex), instead of rolling its own, but that will take significant work. I haven't had a chance to look into this module and figure out how it works; this will have to be another project on the list of projects to get to (User:0DF also asked for help in Dec 2023 in making changes to this module). Benwing2 (talk) 23:49, 25 January 2024 (UTC)Reply
It seems like we have several cases for titles: translation and conventional transliteration (Module:Quotations/grc/data, Module:Quotations/egy/data), transliteration (Module:Quotations/ota/data), transliteration and translation (Module:Quotations/hy/data, Module:Quotations/xcl/data), original language (Module:Quotations/inc-mgu/data, Module:Quotations/ae/data). The data module format would need to distinguish these cases to allow transliterations to be automatically generated. — Eru·tuon 00:11, 26 January 2024 (UTC)Reply