Module talk:usex
Add topicSubstitution parameter
[edit]@Benwing2: Why did you change it from yesterday? It was better as it was before to have a list in a single parameter. --WikiTiki89 12:30, 25 April 2017 (UTC)
- @Wikitiki89, Chuck Entz I changed it because someone added the qualifier=/q= parameter as a list parameter and I figured I would make it work the same. I can change it back if you'd rather. I changed it from sub= to subst= on a request from CodeCat. I looked for module errors and didn't see any; I guess they took a while to show up. Benwing2 (talk) 13:57, 25 April 2017 (UTC)
- I don't care so much about the name of the parameter, just that the text
|substN=
is much longer than,
, and much more difficult to maintain because of the numbering. --WikiTiki89 14:00, 25 April 2017 (UTC)- @Wikitiki89 OK I'll change it back. Benwing2 (talk) 14:06, 25 April 2017 (UTC)
- I tried to beat you to it, but I may have broken something. --WikiTiki89 14:07, 25 April 2017 (UTC)
- Never mind, fixed. --WikiTiki89 14:08, 25 April 2017 (UTC)
- I tried to beat you to it, but I may have broken something. --WikiTiki89 14:07, 25 April 2017 (UTC)
- @Wikitiki89 OK I'll change it back. Benwing2 (talk) 14:06, 25 April 2017 (UTC)
- I don't care so much about the name of the parameter, just that the text
Category namespaces
[edit]@DTLHS, Erutuon Why not just use the namespace filtering capability that's already in Module:utilities for this? —Rua (mew) 21:24, 30 January 2018 (UTC)
- It's already being used on line 202- are you sure it works? DTLHS (talk) 22:31, 30 January 2018 (UTC)
- No, there's a problem with it, but that can and will be fixed. This module should be written with the assumption that Module:utilities works as intended though, otherwise we will have two modules to fix instead of just one. —Rua (mew) 22:36, 30 January 2018 (UTC)
Inline formatting
[edit]@DTLHS, Wikitiki89, Erutuon, can we change the formatting of inline quotations from:
- वृषणं धीभिर अप्तुरं सोमम ऋतस्य धारया । मती विप्राः सम अस्वरन ॥ ― vṛ́ṣaṇaṃ dhībhír aptúraṃ sómam ṛtásya dhā́rayā । matī́ víprāḥ sám asvaran ॥ ― To the water-crossing bull, Soma, in a stream of truth have the inspired poets cried out in unison with their insights, their thought.
to the more standard formatting of:
- वृषणं धीभिर अप्तुरं सोमम ऋतस्य धारया । मती विप्राः सम अस्वरन ॥ (vṛ́ṣaṇaṃ dhībhír aptúraṃ sómam ṛtásya dhā́rayā । matī́ víprāḥ sám asvaran ॥, “To the water-crossing bull, Soma, in a stream of truth have the inspired poets cried out in unison with their insights, their thought.”)
--Victar (talk) 16:50, 20 November 2018 (UTC)
- Of course we can, I don't know what "standard" is, do other people agree with this? DTLHS (talk) 16:58, 20 November 2018 (UTC)
- @DTLHS, "standard" being the more common formatting used in templates such as
{{l}}
, as illustrated above. --Victar (talk) 17:19, 20 November 2018 (UTC) - I'd also like to suggest the translation request message be formatted like in
{{l}}
, ex. अप्तुरं (apturaṃ, [translation needed]). --Victar (talk) 17:35, 20 November 2018 (UTC)
- @DTLHS, "standard" being the more common formatting used in templates such as
- It would be best to bring this up in the Beer Parlour to see what other people think. I've made changes to a widely used module on someone's request (Module:columns) and then had someone else object, and would prefer not to do that again. — Eru·tuon 20:18, 20 November 2018 (UTC)
Spurious 'Multiple Transliteration' Categorisation
[edit]Non-Japanese pages are being listed in Category:usex with multiple transliterations for containing '<br>' or '<br/>' in the transliteration. As this is supposed to be a 'temporary category for Japanese', would it be a good idea to restrict the categorisation to quotes and examples for Japanese? There are various reasons for preserving line-breaks from quoted text. -- RichardW57 (talk) 03:19, 30 June 2019 (UTC)
- I think I added that. It seems pointless now, I'll remove it. DTLHS (talk) 03:27, 30 June 2019 (UTC)
Audio parameter?
[edit]@Benwing2, Erutuon: Could somebody please implement support for an audio parameter (|audio=
and |a=
)? I've seen multiple ux'es on Wiktionary with an accompanying audio file but they used differing, nonstandard formats. I think we'd do ourselves a favor by having the audio associated with the {{ux}}
in a standardized way. — Fytcha〈 T | L | C 〉 10:46, 26 February 2022 (UTC)
- @Fytcha Can you point me to some examples of usexes that have accompanying audio files, so I can use them for testing purposes? Benwing2 (talk) 19:30, 26 February 2022 (UTC)
- I'd prefer from a UX standpoint if the audio icons were small, like the way Wikipedia handles inline audio, e.g. in the first sentence of Berlin; but unlike Wikipedia's, played without going to a separate page. But if that's not an option, then having the bulky audio player is better than linking to a separate page. 70.172.194.25 00:01, 27 February 2022 (UTC)
- @Benwing2: We have another example at hellhörig now. There will be more in the future because the kind person who does German audio recordings also works for de.wikt where they regularly document collocations as separate pages. — Fytcha〈 T | L | C 〉 17:39, 13 June 2022 (UTC)
- @Fytcha OK. Let me see about adding it. If someone e.g. unpingable 70.172.194.25 can give me HTML to for the small inline audio player, I can just stick this in. Benwing2 (talk) 01:26, 14 June 2022 (UTC)
- @Benwing2: On a side note, do you know why the audio player has been changed semi-recently? It used to have a progress bar where one can rewind but it is gone now. The new player is also bigger (at least vertically). I hope we can revert that change somehow. — Fytcha〈 T | L | C 〉 01:39, 14 June 2022 (UTC)
- @Fytcha Can you post on Grease Pit about this? Maybe someone (e.g. User:Erutuon or User:Surjection) can help. I don't see any recent changes to any likely suspects (e.g. Template:audio, Template:audio/styles.css, MediaWiki:Common.js, MediaWiki:Common.css) but I also can't find the definition of the
audiotable
CSS class; presumably that definition has changed. Benwing2 (talk) 02:32, 14 June 2022 (UTC) - Isn't this a result of the switch to the new media player? Did the change you're referring to happen more recently than that switch? 98.170.164.88 02:37, 14 June 2022 (UTC)
- @Fytcha Can you post on Grease Pit about this? Maybe someone (e.g. User:Erutuon or User:Surjection) can help. I don't see any recent changes to any likely suspects (e.g. Template:audio, Template:audio/styles.css, MediaWiki:Common.js, MediaWiki:Common.css) but I also can't find the definition of the
- @Benwing2: On a side note, do you know why the audio player has been changed semi-recently? It used to have a progress bar where one can rewind but it is gone now. The new player is also bigger (at least vertically). I hope we can revert that change somehow. — Fytcha〈 T | L | C 〉 01:39, 14 June 2022 (UTC)
- @Fytcha OK. Let me see about adding it. If someone e.g. unpingable 70.172.194.25 can give me HTML to for the small inline audio player, I can just stick this in. Benwing2 (talk) 01:26, 14 June 2022 (UTC)
- More ux'es with audio: 일 (il) — Fytcha〈 T | L | C 〉 16:53, 2 July 2022 (UTC)
- There are also quotations with audio: AI. — Fytcha〈 T | L | C 〉 13:04, 15 August 2022 (UTC)
- More ux'es with audio: 이 (i) — Fytcha〈 T | L | C 〉 11:22, 31 December 2022 (UTC)
- @Fytcha: I don't like the appearance of the template in the entries you linked with the exception of hellhörig. Ioaxxere (talk) 00:53, 31 August 2024 (UTC)
- @Ioaxxere hellhörig is not using User:Fytcha's new param, but is using
{{audio}}
embedded in the footer. One possibility is, at least in multiline (non-inline) usexes, to simply call Module:audio and put the result on its own line, just as if{{audio}}
were invoked. Benwing2 (talk) 01:41, 31 August 2024 (UTC)- @Benwing, Ioaxxere: I overlooked to convert hellhörig to the new format. Benwing's suggestion above seems fine to me. Alternatively, we could also internally invoke
{{audio}}
and place the output on the same line as the example. That might look a bit visually imbalanced but at least it makes it clear that the audio belongs to the original language, not the translation. BTW I don't have a lot of time to work on this right now so if anybody wants to change it the way they see fit, by all means go ahead. — Fytcha〈 T | L | C 〉 20:26, 14 September 2024 (UTC)
- @Benwing, Ioaxxere: I overlooked to convert hellhörig to the new format. Benwing's suggestion above seems fine to me. Alternatively, we could also internally invoke
- @Ioaxxere hellhörig is not using User:Fytcha's new param, but is using
@Benwing2: I've now gone ahead and implemented (a rudimentary version of) this feature: diff in Module:usex/templates, diff in Module:usex. See the entry einjagen to see this feature in action. — Fytcha〈 T | L | C 〉 16:14, 30 August 2024 (UTC)
- @Fytcha OK sounds good. Possibly we should use something similar to what Module:audio does but what you have looks fine to me. Benwing2 (talk) 16:56, 30 August 2024 (UTC)
- @Benwing2: I thought about about making it such that the user would have to provide
{{audio}}
as an argument, i.e.|audio=
, but now that{{audio|...}}
{{audio}}
prints "Audio: " by default that's not really possible anymore.{{audio}}
's other parameters would be nice to have (especially|a=
) but I guess what I implemented already covers the majority of use cases. — Fytcha〈 T | L | C 〉 17:03, 30 August 2024 (UTC) - We could theoretically also use the syntax that many of your module use:
|audio=file.ogg<a:US>
— Fytcha〈 T | L | C 〉 17:05, 30 August 2024 (UTC)- Yeah it might be nice to implement inline modifiers as you suggest. At this point it's not hard to do as there's good module support for them. Note that generally it's not preferred to embed one template in another. Benwing2 (talk) 23:44, 30 August 2024 (UTC)
- @Benwing2: I thought about about making it such that the user would have to provide
- @Fytcha: It'll look better if it was on its own line. Currently, the icon is higher than the text. — Fenakhay (حيطي · مساهماتي) 23:44, 30 August 2024 (UTC)
Query to find more audios not yet added to {{ux}}
. — Fytcha〈 T | L | C 〉 19:17, 2 December 2024 (UTC)
span instead of div for inline ux'es?
[edit]@Benwing2: Is there any downside to using a span instead of a div for inline ux'es? The upside would be that usage examples can be mixed with running text, something I've wanted to do on multiple occasions, most recently in Lächeln. — Fytcha〈 T | L | C 〉 18:16, 9 November 2022 (UTC)
- @Fytcha I'm not sure. Maybe User:Erutuon could answer better. We could try it with some examples and see how it turns out. Benwing2 (talk) 01:43, 10 November 2022 (UTC)
- @Benwing2: I'd say go ahead and test it. I can't think of any problems, and it makes sense to use an inline tag (span) rather than block tag (div) for inline content. — Eru·tuon 21:19, 13 November 2022 (UTC)