Template talk:Taken on

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Taken on missing SDC inception

[edit]

As I understand it, the property P571 specifies the date of the represented object and not the date when the photograph was taken.
Why then, when using the {{Taken on}} template for the date in the file description, the hidden category Taken on missing SDC inception is always entered?
F. Riedelio • talk 08:16, 31 January 2022 (UTC)[reply]

Categorize bad uses of this template

[edit]

I see a fair number of pages using {{Taken on|1983|04|26}} which renders "Taken on 1983" (File:Secretary of Defense Caspar W. Weinberger meets with Secretary General of NATO Luns in the Pentagon 1983.jpg for example). It'd be helpful to add these files to a category possibly called "Bad usage of the Taken on templates" (for example) so that they could easily be fixed by a bot.

The template could have some thing like {{#if: {{{2|}}} | [[Category:Bad usage of the Taken on templates]] | }} added to it.

Thoughts? Cryptic-waveform (talk) 14:56, 28 October 2022 (UTC)[reply]

Seems very reasonable and easy to introduce. {{{2|}}} isn't used, so that's a good determinator. Huntster (t @ c) 19:13, 28 October 2022 (UTC)[reply]
OK. Here is the suggested diff. Right before </includeonly> add {{#if:{{{2|}}} | [[Category:Pages using Taken on template with incorrect parameter]]}}
Here is how I tested it:
I don't have the permission to modify the template so will need a template editor or administrator to make this change on my behalf. Cryptic-waveform (talk) 12:27, 29 October 2022 (UTC)[reply]

{{Edit request}}

✓ Done in Special:Diff/700385725. --TKsdik8900 (talk) 23:56, 29 October 2022 (UTC)[reply]

Why is automatic categorization not working in this case

[edit]

--Ioacc1234red (talk) 19:12, 5 January 2023 (UTC)[reply]

@Ioacc1234red: If you're asking why {{Information}} doesn't automatically categorize, then that is a question for that template. Even so, it won't be done because there is a wide variety of non-standard values that could be used in the Date field. For instance, {{Other date}}, {{Published on}}, {{According to Exif data}}, etc. Plus, an entirely new parameter for Information for country would have to be introduced to add that functionality. Either way, it is nothing that *this* template has any control over. Huntster (t @ c) 20:41, 5 January 2023 (UTC)[reply]
@Huntster: No, exactly this template is required for categorizing, I know {{Information}} is base template with base parameter |date=. Check at least first-bullet question... Regex ^%d%d%d%d%-%d%d%-%d%d may be used in this template after encompassing date parameter's content by this template (it would reduce need of manual addition of single categories 'Photographs taken on yyyy-mm-dd' for some less experienced users who just upload different files or batch of useful files but that could be better if categorized by date; creating those categories, that use template for displaying content and further categorization is needed anyway, possibly with some bot help by some user). Current practise is as I suggested, nesting date param's content into this, {{Taken on}}, template (e.g.). --Ioacc1234red (talk) 10:13, 10 January 2023 (UTC)[reply]
@Ioacc1234red: again, there are concerns over auto-categorization of the date field for that template. I know I deal with a lot of files where the date given is a publication date rather than the date of photography, and many uploaders do not distinguish between the two. Auto-categorization would mean such images would be wrongly categorized. What about graphic images where the date of creation is given? These are not photographs but again would be wrongly categorized. All I'm saying is that while I appreciate the idea being posed, there are a variety of reasons why it would not be a good idea. And, again, any decision for such an implementation would ultimately have to be made at Template talk:Information, not here, since that is where the code would reside. Huntster (t @ c) 15:01, 10 January 2023 (UTC)[reply]
I disagree. Check my previous answer (idea). Date param gets auto-filled for template Information while uploading according to exif data of e.g. mobile-taken file (or something else machine readable). Last stop, that can add category and possibly handle further, is template Taken on in combination with Information and bot action. --Ioacc1234red (talk) 19:38, 12 January 2023 (UTC)[reply]
But it can get auto-filled or manually filled in many other types of dates: creation date (non-photographic media), scan date (2D artworks/documents/non-digital photos) etc. Not categorizing many files that could get categorized is still much better than categorizing many files that shouldn’t be. —Tacsipacsi (talk) 21:51, 12 January 2023 (UTC)[reply]

{{int:parentheses}}

[edit]

@TKsdik8900: Could you please give a concrete example (exact language code + wikitext) where {{int:word-separator}} and {{int:parentheses}} don’t work? I previewed the template in Chinese and it used ( and ) with no extra space, as expected. —Tacsipacsi (talk) 13:08, 6 May 2023 (UTC)[reply]

In Japanese, the following string:
<nowiki />{{int:word-separator}}{{ISOdate| 2022-11-17 }}<nowiki />{{int:word-separator}}{{int:parentheses|{{According to Exif data/translations}}}}
shows:
2022年11月17日 (Exifデータによる)
In this string, there is a space between "日" and "(", and the parentheses are not full-width. (I also checked in the zh-** environment, but it seems to be my misapprehension there. It worked well in that environment. I'm sorry.) --TKsdik8900 (talk) 14:03, 6 May 2023 (UTC)[reply]
I see. I checked only Chinese, which works as expected, and you checked only Japanese, which doesn’t… It uses the MediaWiki messages parentheses and word-separator, whose Japanese translations, as you can see from the deletion log and page history, have been changed back and forth multiple times. Instead of changing the parentheses only for this template, I’d like you to discuss and decide on a variant on translatewiki, and use that here to ensure consistency among templates and between the templates and the interface. —Tacsipacsi (talk) 12:13, 7 May 2023 (UTC)[reply]

{{Edit request}} Hi. This template has a weird behavior when only a partial date is provided. See File:Deobas camping ground ,Dhumdhar kandi pass 1991 - panoramio.jpg for an example. The template displays a seemingly random date within the year. It's difficult to search for such cases so it'd be best to add them to Category:Pages using Taken on template with incorrect parameter. Could the following be added to the end of the template?

{{#ifexpr: {{Str len|{{{1}}}}} < 8 | [[Category:Pages using Taken on template with incorrect parameter]] }}

I picked 8 since sometimes dates can be written without leading zeros for the month and day, "1918-1-1" for example. Thanks in advance. Cryptic-waveform (talk) 13:32, 22 May 2023 (UTC)[reply]

✓ Done in Special:Diff/847754526. --TKsdik8900 (talk) 09:24, 1 February 2024 (UTC)[reply]

Edit request: addition of new "subject=" parameter

[edit]

{{Edit request}} I request the addition of a new "subject=" parameter.

At the moment, an editor can specify a "location", and the template will then automatically categorise the photograph as "[location] photographs taken on yyyy-mm-dd". But there are also certain subjects that should similarly be categorised in this way. At the moment, eg, there are "Category:Aviation photographs taken on yyyy-mm-dd" (currently there are 321 categories in this form) and "Category:Railway photographs taken on yyyy-mm-dd" (currently 7527 such categories). Similar subject categorisations might be created in future, eg "Category:Water transport photographs taken on yyyy-mm-dd".

So I request that this template be amended such that if it is configured as, eg, {{Taken on |subject=Aviation |location=Japan |yyyy-mm-dd}}, it will automatically categorise the photograph as both "Category:Aviation photographs taken on yyyy-mm-dd" and "Category:Japan photographs taken on yyyy-mm-dd". Thanks in advance. Bahnfrend (talk) 04:34, 18 December 2023 (UTC)[reply]

 Not done Bahnfrend, I am not a big fan of automatic categories added by templates, unless they are some sort of maintenance categories. One issue is that sometimes those categories do not make sense for a given file and people end up removing otherwise useful templates to fix categorization problems. Another issue is that it is unclear how those categories got there, breaking en:Principle of least astonishment. --Jarekt (talk) 04:04, 19 June 2024 (UTC)[reply]

Edit request: parameters to suppress specific categories

[edit]
It is requested that an edit or modification be made to this protected page.
Administrators/template editors: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.

Prototyperspective

Currently, videos of the Sun clutter the category Category:Videos of 2023 (maybe also some other cats). It's fine if for example the Category:2023-12-30 is set, I'd only like to suppress the automatic addition of this specific category.

It would be better if one auto-set category can be set as a parameter, it's surprising this isn't already possible. If it was possible, one could set a category like Category:Videos of the Sun in 2023 by SDO (see Category:Videos from the Solar Dynamics Observatory) as a parameter in Template:NASA SDO/date.

Please make it possible to define which category is suppressed or whether or not the "Videos of {year}" category is suppressed (would favor that for now) and/or which category is set in place of "Videos of {year}". Prototyperspective (talk) 13:46, 31 December 2023 (UTC)[reply]

Please implement this, can't edit the page. Videos of 2023 and other categories are still mostly filled with SDO videos of the Sun. Prototyperspective (talk) 14:03, 17 March 2024 (UTC)[reply]
Prototyperspective, One can suppress addition of any automatic category by setting "|cat=no" parameter. Then one can add any category they want to individual files. Would that solution work for you? --Jarekt (talk) 04:11, 19 June 2024 (UTC)[reply]
Thanks, it's better than nothing but it would only be a temporary solution because it would be good to keep the other cats. Another issue is that it would be difficult to edit so many files at once so some script/tool would probably be needed. However, the files are now gone from Videos of 2023 etc so this seems solved now even though I don't know how, maybe @Don-vip: solved it. I still think a parameter to suppress a specific auto-set category or the year category in specific would be useful but the problem seems solved now. Prototyperspective (talk) 13:54, 19 June 2024 (UTC)[reply]

Use of the location parameter for country subdivisions

[edit]

Somewhat recently, Mike1979 Russia has been moving files from categories such as, e. g., Category:Russia photographs taken on 2020-08-14 to, e. g., Category:Perm Krai photographs taken on 2020-08-14 (Special:Diff/843345227). At a glance, I see no prior discussion for these changes.

When the file uses {{Taken on}} for categorization, such a move is performed by using, say, location = Saint Petersburg in place of location = Russia (where Saint Petersburg is a city which is also a federal subject / constituent of Russia; Special:Diff/843346465.)

So far as I can tell, such a change is at odds with the {{Taken on}} documentation, which clearly specifies that the value of the location parameter is ought to be a country, not a subdivision thereof. So, the question is, do we want to adopt the new usage, and update the documentation accordingly; or should we rather revert the edits back to align with the current documentation / usage?

Personally, I’d prefer for the use of location to specify country to be retained (though I won’t be opposed to a separate new parameter for country subdivisions.) Otherwise, if it’s decided that location can be used for subdivisions, I’d argue that implementing the change at large should be done with a bot, not manually.

Thoughts?

M4773R (talk) 11:00, 19 January 2024 (UTC)[reply]

1. The changeings in the template was forced, since if you leave the "location=Russia" will come OVERCAT.
2. In the “usage” description of the template, there is no strong requirement to use the names of countries only. There is a requirement to use categories from "Category:Photographs by date by country", which was followed.
3. The main category already had subcategories that were not countries, for example, Guam, Scotland, Crimea, etc. The UK was already divided into sub-categories by location.
Thus, I do not observe the described problem; it is enough to remove the word in the "Localization" section. Mike1979 Russia (talk) 07:11, 20 January 2024 (UTC)[reply]

Edit request: better categorization of videos when possible

[edit]

{{Edit request}} Please change line 60 of the code to the following. It will categorize videos in a specific date category if it exists, otherwise fall back on the previously established behavior:

| video = {{#ifexist:Category:Videos taken on {{Trunc | {{Ymd|1={{{1}}}}} | 10 }}|[[Category:Videos taken on {{Trunc | {{Ymd|1={{{1}}}}} | 10 }}]]|[[Category:Videos of {{ISOyear | {{Ymd|1={{{1}}}}} }}]] [[Category:{{Trunc | {{Ymd|1={{{1}}}}} | 10 }}]]}} OmegaFallon (talk) 23:51, 19 February 2024 (UTC)[reply]

Notifying @TKsdik8900 since you were the last to edit this template. OmegaFallon (talk) 00:16, 20 February 2024 (UTC)[reply]
✓ Done in Special:Diff/853793404. Please make sure it is working as you expect. --TKsdik8900 (talk) 07:28, 20 February 2024 (UTC)[reply]

Translation in Croatian

[edit]

{{Editprotected}}

Please, add

|hr=Fotografirano:

Thank you. MaGa 19:14, 29 February 2024 (UTC)[reply]

✓ Done --Lucas Werkmeister (talk) 12:24, 16 March 2024 (UTC)[reply]

Criteria and bots for the "Videos by year" categories

[edit]

Please see and participate at Category talk:Videos by year#Criteria? Bot?. Prototyperspective (talk) 16:43, 24 June 2024 (UTC)[reply]