Module:auto cat: Διαφορά μεταξύ των αναθεωρήσεων

Περιεχόμενο που διαγράφηκε Περιεχόμενο που προστέθηκε
Θεματικές ορολογίες = Θεματικές κατηγορίες όπως Διαχείριση Κατηγοριών 2021
CATFIX to do, instructions...
Γραμμή 92:
* topos+where. REDO IT. CANNOT toposwhere label = topos kind id.
Cannot toposwhere_label.descr [[:Κατηγορία:Διαμερίσματα της Ελλάδας]]
* NEED precise link to the LanguageSection in categories. See CATFIX
e.g. members of [[:Κατηγορία:Τρόφιμα (γαλλικά)]] should link to Section Γαλλικά (fr)
that is Κατηγορία:Title (Module:Languages.name) should link to page#Module:Languages.link
]=]--
 
Γραμμή 103 ⟶ 106 :
-- βλ. Τοπωνύμια: [[Module:topos/functions]] -- handles keywords of placenames
 
-- DATAONLYMODULESDATA-ONLY-MODULES needed
local languages = mw.loadData("Module:Languages") -- all language keywords are in here
-- call with languages[language_iso].somekeyword (first, need to make language_iso)
Γραμμή 112 ⟶ 115 :
-- call with data.level_1bylang[cat_title]
-- call with data.label[cat_title].somekeyword or data.label[cat_title]['somekeyword']
-- ##?? TO DO: how can I cobmine to local data the topics and style ??
local topics = mw.loadData("Module:auto cat/data/topics") -- corresponds to [[Module:labels/data]] only at Θεματικές section
-- call with topics.label[cat_title].somekeyowrd or topics.label[cat_title]['somekeyword']
local style = mw.loadData("Module:auto cat/data/style") -- labels for style found in [[Module:labels/data]]
-- call with style.label[cat_title].somekeyword or style.label[cat_title]['somekeyword']
 
local topos = mw.loadData("Module:topos/kind") -- all placename keywords are in here
-- call with topos[toposid].somekeyword (first, need to make toposid)
Γραμμή 119 ⟶ 126 :
-- call with toposkind.label[cat_title].somekeyword
-- I need it only to get the key for m_topos
-- but i need to do HERE all the if title ... then cat_title... (see TOPOS SECTION)
local style = mw.loadData("Module:auto cat/data/style") -- labels for style found in [[Module:labels/data]]
 
-- call with style.label[cat_title].somekeyword or style.label[cat_title]['somekeyword']
 
-- parameters ========================
Γραμμή 225 ⟶ 232 :
-- text_topos = text_wikt .. ' » [[:Κατηγορία:Θεματικές κατηγορίες|Θεματικές κατηγορίες]]'
-- .. ' » [[:Κατηγορία:Ονομασίες|Ονομασίες]] » [[:Κατηγορία:Τοπωνύμια ανά είδος|Τοπωνύμια]]'
 
 
-------------------------------------------------------------------------- ##### TO DO needs interface admin
-- CATFIX --
-- precise links to Language Sections --
--------------------------------------------------------------------------
--[=[
* NEED precise link to the LanguageSection in categories. See CATFIX
e.g. members of [[:Κατηγορία:Τρόφιμα (γαλλικά)]] should link to Section Γαλλικά (fr)
what is in parenthesis is ALWAYS the language name
that is Κατηγορία:Title (Module:Languages.name) should link to page#Module:Languages.link
Instructions at https://en.wiktionary.org/wiki/Wiktionary:Grease_pit/2021/June#Links_from_categories
What we do is insert the HTML code created by <code>require "Module:utilities".catfix(language_object, optional_script_code)</code>
into category pages, and then run [[MediaWiki:Gadget-catfix.js]] to transform the category links.
The gadget is installed [[MediaWiki:Gadgets-definition#Hidden_gadgets_and_utils|here]]
so that it is loaded efficiently by the server.
The catfix HTML is inserted either by calling the module function in the module functions that generate category descriptions
(for instance in many categories that are added by {{temp|autocat}})
or by using {{temp|catfix}} in a page. So it's a combination of a module and a JavaScript gadget. — [[:en:User:Erutuon]]
 
-- here, in el.wiktionary we have:
if cat_parenthesis == '' or cat_parenthesis == nil then -- there is NO LANGUAGE
-- do nothing
else -- There is a language name in parenthesis. See above, mode b
-- cat_title is the Title of page WITHOUT parenthesis
-- cat_lang = m_page.pagelang(xx) -- textofparenthesis without brackets = the language name in the category titles
-- i have the iso of the language: lang_iso = require("Module:lang").langname_to_langiso(cat_lang)
-- lang_name = languages[lang_iso].name -- = in the parenthesis cat_lang
-- we need the id ancor to language Sections in pages. This is lang_cat = languages[lang_iso].cat
-- make link:
-- [[cat_title#lang_cat]]
]=]--
 
 
--------------------------------------------------------------------------