Template talk:Closed captions
Proposal
[edit]- I propose we add a link to the mwEmbed gadget to highlight the fact the subtitles can be played back "inline" and multiple languages that can be selected. Can work similar to the User:MediaBot page using the <span class="videonojs"> {{Localized msg about installing mwEmbed gadget }} </span> Mdale (talk) 01:19, 22 December 2009 (UTC)
- Yes, good idea. Do it. --Slomox (talk) 02:06, 22 December 2009 (UTC)
Display the language instead of the links
[edit]Is it possible that the template displays the language of the linked captions instead of simply the link? as in File:Elephants Dream.ogg "Elephants Dream.ogg.en.srt" should be "English" or "English caption"... --Diaa abdelmoneim (talk) 09:20, 24 December 2009 (UTC)
- It's not possible with normal wiki-syntax. It would be possible by exploiting some extremely ugly template-hacks (see w:en:Template:Str sub and other string manipulation templates). Or it would be possible with Javascript. --Slomox (talk) 13:32, 24 December 2009 (UTC)
Suggest link to media
[edit]See TimedText talk:051118-WSIS.2005-Richard.Stallman.ogg.en.srt for an example of what I mean. It seems that even if a reader finds these timed text files, they will have difficulty finding the associated video. The "what links here" will not help. Maybe {{Closed captions}} could be enhanced by including the media link? -84user (talk) 21:28, 21 December 2010 (UTC)
Template breaking on Wikipedias
[edit]This template is being used inside Wikipedias (like in pt:File:Great_Feeling.ogv) but when the button is clicked to create subtitles in a new language a page is created in the Wikipedia (like pt:TimedText:Great Feeling.ogv.pt-br.srt) not in Commons, as it would be expected (like TimedText:Great_Feeling.ogv.pt-br.srt). I think the inputbox should have something to prevent it from happening. I tried to solve it but broke the template inside commons itself ;-/ Any sugestions? Crang115 (talk) 19:30, 20 December 2013 (UTC)
I think that if we replace the lines:
default=TimedText:{{#if: {{{1|}}} | {{{1}}} | {{PAGENAME}}}}.{{int:lang}}.srt
preload=TimedText:{{#if: {{{1|}}} | {{{1}}} | {{PAGENAME}}}}.en.srt
to:
{{#ifeq:{{SITENAME}}|Wikimedia Commons|default=|default=:commons:}}TimedText:{{#if: {{{1|}}} | {{{1}}} | {{PAGENAME}}}}.{{int:lang}}.srt
{{#ifeq:{{SITENAME}}|Wikimedia Commons|preload=|preload=:commons:}}TimedText:{{#if: {{{1|}}} | {{{1}}} | {{PAGENAME}}}}.en.srt
it should work, but I would like to read another opinions before changing it. User:McZusatz? Crang115 (talk) 20:26, 20 December 2013 (UTC)
User:Danilo.mac made a cleaner suggestion on IRC:
default={{#ifeq:{{SITENAME}}|Wikimedia Commons||commons:}}TimedText:{{#if: {{{1|}}} | {{{1}}} | {{PAGENAME}}}}.{{int:lang}}.srt
preload={{#ifeq:{{SITENAME}}|Wikimedia Commons||commons:}}TimedText:{{#if: {{{1|}}} | {{{1}}} | {{PAGENAME}}}}.en.srt
I guess both solutions should work. Crang115 (talk) 20:48, 20 December 2013 (UTC)
- Did it work for you? For me it did not. Therefore I have reverted the edit. --McZusatz (talk) 00:06, 21 December 2013 (UTC)
- Yes, it didn't work. At least this time it didn't broke on commons. I'm wondering if the special word PAGENAME is being solved inside commons, not in the destination page. I'm tring to do some tests with other special words like FULLURL, but they are not working for me. Crang115 (talk) 00:13, 21 December 2013 (UTC)
- I used :w:commons: and it worked. I know it is not the most elegant way to do it, but since it was an urgent issue (Wikipedias were creating useless pages with this button) I think we should let it like this until a better solution shows up. Crang115 (talk) 00:33, 21 December 2013 (UTC)
- Yes, it didn't work. At least this time it didn't broke on commons. I'm wondering if the special word PAGENAME is being solved inside commons, not in the destination page. I'm tring to do some tests with other special words like FULLURL, but they are not working for me. Crang115 (talk) 00:13, 21 December 2013 (UTC)
- (above discussion moved here from Template talk:Closed captions/layout.)--RoyZuo (talk) 13:21, 22 November 2024 (UTC)
Italian translation of template stuff
[edit]User:Viscontino posted this at TimedText:Closed cap.it.srt
1 00:00:20,000 --> 00:00:24,400 Testo che deve essere mostrato dal secondo 20 al secondo 24
2 00:00:24,600 --> 00:00:27,800 Testo che deve essere mostrato dal secondo 24 e 600 millesimi al secondo 27 e 800 millesimi
WhisperToMe (talk) 04:30, 13 March 2013 (UTC)
Template is wrong
[edit]On TimedText talk:Elephants Dream.ogv.nl.srt there is a link "Full list of subtitles." which links to https://commons.wikimedia.org/wiki/Special:PrefixIndex/TimedText:Elephants_Dream.ogg.nl.srt. , which is empty.
Also until the software links back to the media description page, this template should link to File:Elephants_Dream.ogg.
John Vandenberg (chat) 10:32, 13 May 2016 (UTC)
- yeah. it works okay only if the template is used on the file itself: File:Elephants Dream.ogg --アンタナナ 10:43, 13 May 2016 (UTC)
Support user language
[edit]Is it reasonable/possible to detect the user language and highlight it if it exists (and even transclude it?) or give easy direct link for the user to create a translation in their language. John Vandenberg (chat) 19:30, 17 May 2016 (UTC)
Three-letter language codes
[edit]Does the template have issues with three-letter ISO codes? It looks like only languages with two-letter ISO codes are shown in the list. Al12si (talk) 12:24, 18 April 2023 (UTC)
- @Al12si: I confirm the issue. It’s apparently everything not consisting of two letters. I’ve recently created a
de‑formal
TT, it doesn’t get listed by the template, though. Well, at least you can select it from the video player. ‑‑ Kays (T | C) 03:12, 30 September 2024 (UTC)
Edit request: distinguish between audio and video files in the category set
[edit]This template sets Category:Files with closed captioning. Please make it automatically set Category:Videos with closed captioning and Category:Audio files with closed captioning (subcats by language) instead.
Category:Videos with subtitles should only contain videos but contains Category:Files with closed captioning; subcats like Category:Files with closed captioning in English are in Category:Videos with English subtitles and also should only contain video files. Separating videos and audio files is also useful for various applications. I don't know how this template works and can't edit it. Prototyperspective (talk) 12:33, 5 September 2024 (UTC)
- @Prototyperspective: I’m afraid this necessitates payload inspection – looking at the number of embedded video streams, looking at the number of embedded audio streams –, which to the best of my knowledge cannot be done from a template. ‑‑ Kays (T | C) 03:12, 30 September 2024 (UTC)
- You misunderstood what I was asking for. I was asking about distinguishing between files of the audio filetypes and the video filetypes – .webm is a video filetype, ogg is an audio filetype. Prototyperspective (talk) 11:00, 30 September 2024 (UTC)
- @Prototyperspective: No, I understood your request. WebM and OGG are fairly universal container formats, though, designed for media playback of any kind. It is quite possible to create a WebM or OGG file without any video and without any audio streams. ‑‑ Kays (T | C) 05:06, 4 October 2024 (UTC)
- Are denying the fact that all WebM files here are videos and that ogg files are supposed to be audio files on WMC? Prototyperspective (talk) 11:40, 4 October 2024 (UTC)
- @Prototyperspective: No, I’ve uploaded a
.ogg
file that is a video. ‑‑ Kays (T | C) 12:02, 4 October 2024 (UTC)- Ok well I'm not sure if ogg files are supposed to be audio files. I've seen an ogg video here before and here is another. In that case it complicates things for ogg files in specific but for all the other filetypes my request holds as is. For ogg files I don't know if it can somehow be read by the template whether it's a video or audio. Prototyperspective (talk) 12:14, 4 October 2024 (UTC)
- @Prototyperspective: No, I’ve uploaded a
- Are denying the fact that all WebM files here are videos and that ogg files are supposed to be audio files on WMC? Prototyperspective (talk) 11:40, 4 October 2024 (UTC)
- @Prototyperspective: No, I understood your request. WebM and OGG are fairly universal container formats, though, designed for media playback of any kind. It is quite possible to create a WebM or OGG file without any video and without any audio streams. ‑‑ Kays (T | C) 05:06, 4 October 2024 (UTC)
- You misunderstood what I was asking for. I was asking about distinguishing between files of the audio filetypes and the video filetypes – .webm is a video filetype, ogg is an audio filetype. Prototyperspective (talk) 11:00, 30 September 2024 (UTC)
- This is a major problem. The subcategories of Category:Files with closed captioning have things like Category:Videos in Polish set and the cat Category:Videos with subtitles. Files that aren't videos shouldn't be anywhere in the Videos category tree and that there's audio files is also a problem when using the deepcategory search operator looking for videos. These categories often contain most of the videos with subtitles of a given language so they clearly shouldn't be missing from categories like Category:Videos with Spanish subtitles and there's no need to duplicate things and do redundant work. So please edit the template so that it subcategorizes based on the filetype (already also used by MediaSearch or the "General file types" in SpecialSearch). Prototyperspective (talk) 19:02, 19 October 2024 (UTC)
- Oppose Either we do it right, or we do not do it at all. It’s just terrible (template) user experience if it does not work for some files, and yet “magically works” for other files. Not everyone understands the technical intricacies involved here.
- FYI: You can at least query the MIME type (as displayed beneath a thumbnail on the file description page) withThere’s also some “MIME info” categorization but I haven’t found out how to query it outside of a search. Besides, as for now it is implemented poorly, look for
{{#invoke:File|mimeType|file=FrazierCap.theora.ogv}}
HACK
in MimeAnalyzer.php, so it produces inaccurate results. ‑‑ Kays (T | C) 06:54, 21 October 2024 (UTC)- Yes, please it right. I wonder why you oppose this when your text implies you support this. This is a request to distinguish between audio and video files in the category set and it should be done right. Prototyperspective (talk) 11:28, 21 October 2024 (UTC)
too many expensive operations
[edit]@Kai Burghardt: After your addition of great many languages, this template is doing a lot of expensive parser functions, sending files like File:Night of the Living Dead (1968).webm into Category:Pages with too many expensive parser function calls. Can you revert your changes or fix the issue some other way? Jarekt (talk) 18:31, 18 October 2024 (UTC)
- @Jarekt: No, I cannot. The problem really is that the TimedText creation/landing page suggests (as of today) 524 different language codes. Furthermore we have the local language code definition
simple
. And I deemmul
(multiple language) andzxx
(no linguistic contents) as relevant. - Slomox, Pacha Tchernof, McZusatz (some users involved in the template creation): I’m afraid we need to delete this template. It does not scale. Today we may have less than 500 language codes in actual use. However,
vtt
support will come so in the long‑term testing forsrt
existence alone is insufficient. - ‑‑ Kays (T | C) 06:54, 21 October 2024 (UTC)
- @Kai Burghardt: , As number of supported languages surpassed number of allowed expensive parser function calls, bunch of templates related to languages experienced similar issues. In case of other templates we stopped testing for all languages and began testing for the most likely languages. In case of timed text the query quarry:query/87236 shown how many timed text translations we have for each language. For example if you only test for languages with 3+ translations you only need to test ~200 languages, for 2+ about 300 languages. --Jarekt (talk) 20:16, 21 October 2024 (UTC)
- Does somebody know how this problem could be fixed? There's many files in the category you linked, including files with just one subtitle like File:About Archives New Zealand.webm. It doesn't seem to cause any issues with most of these pages however.
- If not, or if it needs technical changes to implement this, a code issues needs to be created.
- If it scans for many languages and that's causing the problem, I think a solution would be changing things (which?) so that it only scans the languages and sets the links & categories whenever a new TimedText subpage is created and then just loads that data instead of doing it dynamically at every page load if it does that currently. I don't think it's a good solution to reduce the number of languages that have TimedTexts if that was what you suggested. Further solutions may also exist and I think your thread initially is/was too specific about one particular file...this seems like a broader problem as the category you also linked to suggests. Oppose deleting the template. Of all the options, deleting the template is the worst and not an option – it could be replaced with something better but until such exists it should not be deleted.
- If nobody here knows what to do I think VP/T would be the next place to ask. Prototyperspective (talk) 08:33, 23 October 2024 (UTC)
- Seems like this would need to get fixed in Template:Closed captions/layout and likely via somehow changing the many ifexist calls. Prototyperspective (talk) 11:42, 26 October 2024 (UTC)
- @Prototyperspective: One might as well argue Template: Media of the day/layout was the culprit (search PWTMEPFC ∖ MOTD), especially if it’s invoked multiple times (MOTD on multiple days). ‑‑ Kays (T | C) 09:45, 8 November 2024 (UTC)
- @Prototyperspective: My point of “deletion” is, we can defer/postpone the problem to a point in time when there are lots of TimedText in (too) many languages; this procedure does not solve the problem of this template at its core, though. ‑‑ Kays (T | C) 09:45, 8 November 2024 (UTC)
- Seems like this would need to get fixed in Template:Closed captions/layout and likely via somehow changing the many ifexist calls. Prototyperspective (talk) 11:42, 26 October 2024 (UTC)
- @Jarekt: Thank you for providing a database query. At the risk of repeating what’s been said in the context of debates concerning the other language‑related templates, I don’t think artificially restricting the set of supported languages provides any good user experience. Currently we use the
#ifexist
to dynamically list timed texts and categorize the file. If it works for most languages, but for some languages it does not (i. e. you need to perform manual categorization [and listing]), it confuses users (both editors and non‑editors). Case in point above discussion. - I’ve been thinking about what you could have meant by “or fix the issue some other way”. How about abandon automatic categorization in favor of a bot editing the file description page as appropriate? Currently the TimedText namespace has very few edits per time unit, so it’s manageable a bot could keep up with that. However, I don’t like the idea of duplicating data that is implicitly already there, besides bots being reactive, attaching to one of the MediaWiki hooks would be better, the best would be not having to deal with this issue at all. For example RoyZuo has criticized the lack of a technically‐aided solution; he seems to consider refactoring this template now, too. ‑‑ Kays (T | C) 09:45, 8 November 2024 (UTC)
- This kind of multilingual templates is a perennial problem. i dont have a solution and dont plan on working on a fix. here're just some ideas of mine:
- https://commons.wikimedia.org/w/index.php?title=User:RoyZuo/common.js&oldid=931644247#L-172 i have a trick to list all timedtext pages.
- language selection should be more user-friendly (type and prompt, rather than select from a list; and a bit of clever guessing (based on user preference, browser ui, ip location...) ). it applies to many different areas where lang selection is needed, like the caption select in the player popup, the timedtext list... and ui lang; uploadwizard caption, description... "select from a list" is only practical when options < 20. it gets super tiring and annoying once the list becomes long.
- mediawiki should have built-in functionality that displays all associated tt pages.
- Commons:Requests for comment/Technical needs survey/TimedText i also suggested tt pages could behave like wikisource pages.
- another idea could be making use of sdc. if tt is present in a lang, that lang is stored in sdc, then a template can make the link and autocat based on sdc. i think?
- RoyZuo (talk) 10:18, 8 November 2024 (UTC)
- No, the automatic categorization is useful and needed. It puts the files into the subtitles categories which can be searched, queried, used search results, etc. Also probably there should be some tech issue about that it should not cause "too many expensive operations", e.g. by making use of caching so these operations are not run at every page load as should be anyway. It must cause a lot of redundant serverload to not have such caching or sth like it. Prototyperspective (talk) 12:48, 8 November 2024 (UTC)
https://commons.wikimedia.org/w/index.php?title=User:RoyZuo/common.js&oldid=931644247#L-172 i have a trick to list all timedtext pages.
- That’s actually possible in wikitext as well (
{{Special:PrefixIndex/TimedText:{{PAGENAME}}}}
), but the resulting format is not very user-friendly and we can’t do anything about it (special page output is transparent to wikitext/modules). Also probably there should be some tech issue about that it should not cause "too many expensive operations", e.g. by making use of caching so these operations are not run at every page load as should be anyway.
- The results are already cached in the parser cache, although I vaguely remember this being true only for English page views on Commons. Yet, the parser cache needs to be regenerated from time to time, and the backlinks that ensure that the parser cache is regenerated when a subtitle is created/deleted also take up space in the database, which is why the number of page existence checks per page is limited.
- Special page transclusion I mentioned above doesn’t ensure the parser cache regeneration, and also uses one query instead of many, so it counts only 1 towards that limit (rather than 1 for every language). It does limit the number of pages shown, but that limit only applies to actually existing pages (translations), so we’re quite unlikely to hit the limit. On the other hand, the lack of parser cache regeneration means that readers can get results that are out of date by at least days, probably even more. —Tacsipacsi (talk) 22:47, 9 November 2024 (UTC)
- This kind of multilingual templates is a perennial problem. i dont have a solution and dont plan on working on a fix. here're just some ideas of mine:
- @Kai Burghardt: , As number of supported languages surpassed number of allowed expensive parser function calls, bunch of templates related to languages experienced similar issues. In case of other templates we stopped testing for all languages and began testing for the most likely languages. In case of timed text the query quarry:query/87236 shown how many timed text translations we have for each language. For example if you only test for languages with 3+ translations you only need to test ~200 languages, for 2+ about 300 languages. --Jarekt (talk) 20:16, 21 October 2024 (UTC)