Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.

Änderungen

Zur Navigation springen Zur Suche springen
1.350 Bytes hinzugefügt ,  01:35, 30. Mai 2016
2016-05-28
Zeile 1: Zeile 1: −
local Serial = "2016-05-20"
+
local Serial = "2016-05-28"
 
--[=[
 
--[=[
 
Unterstützung für {{Literatur}}
 
Unterstützung für {{Literatur}}
Zeile 7: Zeile 7:  
-- Global
 
-- Global
 
local Zitation
 
local Zitation
 +
local Schrei = ""
 
local Selbst = "Vorlage:Literatur"
 
local Selbst = "Vorlage:Literatur"
 
local KategorieBeginn  =  "Wikipedia:Vorlagenfehler"
 
local KategorieBeginn  =  "Wikipedia:Vorlagenfehler"
 
local Kategorien      =
 
local Kategorien      =
    { Intern              = { s = "/Interner Fehler" },
+
        { Intern              = { s = "/Interner Fehler" },
      Parameter          = { s = "/Parameterfehler" },
+
          Parameter          = { s = "/Parameterfehler" },
      ISBNistFormalFalsch = { s = "/Parameter ISBNistFormalFalsch" },
+
          ISBNistFormalFalsch = { s = "/Parameter ISBNistFormalFalsch" },
      TitelP              = { s = "/Parameter Titel-P" }
+
          JahrSeitenzahl      = { s = "/Jahr mit Seitenzahl" },
    }
+
          Monat              = { s = "/Parameter Monat" },
 +
          TitelP              = { s = "/Parameter Titel-P" }
 +
        }
 
local ParValid = {
 
local ParValid = {
 
     Autor              = { Autorin=true,
 
     Autor              = { Autorin=true,
Zeile 22: Zeile 25:  
                             Herausgeberin=true },
 
                             Herausgeberin=true },
 
     Titel              = { ["Titel-P"] = { low=true } },
 
     Titel              = { ["Titel-P"] = { low=true } },
 +
    ["Titel-P"]        = true,
 
     TitelErg            = true,
 
     TitelErg            = true,
 
     Sammelwerk          = true,
 
     Sammelwerk          = true,
Zeile 47: Zeile 51:  
     Fundstelle          = true,
 
     Fundstelle          = true,
 
     ISBN                = true,
 
     ISBN                = true,
     ISBNformalFalsch    = { ISBNistFormalFalsch=true },
+
     ISBNformalFalsch    = true,
     ISBNistFormalFalsch = true,
+
    ISBNdefekt          = true,
 +
     ISBNistFormalFalsch = { ISBNistFormalFalsch = { leave=true } },
 
     ISSN                = true,
 
     ISSN                = true,
 
     ISSNformalFalsch    = true,
 
     ISSNformalFalsch    = true,
Zeile 107: Zeile 112:  
     ISBN            = { "id",      "ISBN" },
 
     ISBN            = { "id",      "ISBN" },
 
     ISBNformalFalsch = { "id",      "ISBNfalsch" },
 
     ISBNformalFalsch = { "id",      "ISBNfalsch" },
 +
    ISBNdefekt      = { "id",      "ISBNdefekt" },
 
     ISSN            = { "id",      "ISSN" },
 
     ISSN            = { "id",      "ISSN" },
 
     ISSNformalFalsch = { "id",      "ISSNfalsch" },
 
     ISSNformalFalsch = { "id",      "ISSNfalsch" },
Zeile 115: Zeile 121:  
     Originaltitel    = { "orig",    "Titel" },
 
     Originaltitel    = { "orig",    "Titel" },
 
     Originalsprache  = { "orig",    "Sprache" },
 
     Originalsprache  = { "orig",    "Sprache" },
 +
    Originalort      = { "orig",    "Ort" },
 +
    Originaljahr    = { "orig",    "Jahr" },
 
     ["Übersetzer"]  = { "orig",    "Translator" },
 
     ["Übersetzer"]  = { "orig",    "Translator" },
 
     OrtEA            = { "ed1",      "Ort" },
 
     OrtEA            = { "ed1",      "Ort" },
Zeile 141: Zeile 149:  
local FunLit = { }
 
local FunLit = { }
   −
--|Lizenznummer nicht genutzt und nicht länger unterstützt
+
--|Lizenznummer nicht genutzt und nicht länger unterstützt, oder doch?
 +
 
 +
 
 +
 
 +
local function falsch( a )
 +
    -- Formatiere Fehler mit class=error unbedingt
 +
    -- Parameter:
 +
    --    a  -- string mit Text
 +
    Schrei = string.format( "%s <span class=\"error\">%s</span>",
 +
                            Schrei, a )
 +
end -- falsch()
          
local function fault( a )
 
local function fault( a )
     -- Formatiere Fehler mit class=error
+
     -- Formatiere Fehler mit class=error einstellungsabhängig
 
     -- Parameter:
 
     -- Parameter:
 
     --    a  -- string mit Text
 
     --    a  -- string mit Text
Zeile 153: Zeile 171:  
         r = Zitation.fault( a )
 
         r = Zitation.fault( a )
 
     else
 
     else
         r = string.format( "<span class=\"error\">%s</span>", a )
+
         r = falsch( a )
 
     end
 
     end
 
     return r
 
     return r
Zeile 185: Zeile 203:  
                                 k = "Parameter" },
 
                                 k = "Parameter" },
 
                   ISBNistFormalFalsch = { k = "ISBNistFormalFalsch" },
 
                   ISBNistFormalFalsch = { k = "ISBNistFormalFalsch" },
 +
                  JahrSeitenzahl      = { k = "JahrSeitenzahl" },
 +
                  Monat              = { k = "Monat" },
 
                   TitelP              = { k = "TitelP" }
 
                   TitelP              = { k = "TitelP" }
 
                 }
 
                 }
Zeile 253: Zeile 273:     
local Titel = function ( args )
 
local Titel = function ( args )
     --    OBSOLET  nach Bereinigung im ANR
+
     --    OBSOLET  nach Bereinigung im ANR; Kat zeitweise ausgesetzt
     if args[ "Titel-P" ] then
+
     if args[ "Titel-P" ]       and false then
 
         fehler( "TitelP" )
 
         fehler( "TitelP" )
 
     end
 
     end
Zeile 281: Zeile 301:  
                     else
 
                     else
 
                         fehler( "Wert",  "'Monat'=" .. args.Monat )
 
                         fehler( "Wert",  "'Monat'=" .. args.Monat )
 +
                        if args.Nummer then
 +
                            args.Nummer = string.format( "%s, %s",
 +
                                                        args.Nummer,
 +
                                                        args.Monat )
 +
                        else
 +
                            args.Nummer = args.Monat
 +
                        end
 +
                        fehler( "Monat" )
 
                         r = false
 
                         r = false
 
                     end
 
                     end
Zeile 291: Zeile 319:  
                         fehler( "Wert", "'Monat'=" .. args.Monat )
 
                         fehler( "Wert", "'Monat'=" .. args.Monat )
 
                         r = false
 
                         r = false
                     elseif s ~= args.Monat then
+
                     elseif s ~= args.Monat  and
 +
                          "0" .. s ~= args.Monat then
 
                         fehler( "Format",  "'Monat'=" .. args.Monat )
 
                         fehler( "Format",  "'Monat'=" .. args.Monat )
 
                     end
 
                     end
Zeile 303: Zeile 332:  
                         fehler( "Wert",  "'Tag'=" .. args.Tag )
 
                         fehler( "Wert",  "'Tag'=" .. args.Tag )
 
                         r = false
 
                         r = false
                     elseif s ~= args.Tag then
+
                     elseif s ~= args.Tag  and
 +
                          "0" .. s ~= args.Tag then
 
                         fehler( "Format",  "'Tag'=" .. args.Tag )
 
                         fehler( "Format",  "'Tag'=" .. args.Tag )
 
                     end
 
                     end
Zeile 317: Zeile 347:  
         else
 
         else
 
             fehler( "Wert",  "'Jahr'=" .. args.Jahr )
 
             fehler( "Wert",  "'Jahr'=" .. args.Jahr )
 +
            if not args.Datum then
 +
                args.Datum = args.Jahr
 +
                if args.Jahr:match( ", S%. ?%d" ) then
 +
                  fehler( "JahrSeitenzahl" )
 +
                end
 +
            end
 
         end
 
         end
 
     elseif args.Monat or args.Woche or args.Tag then
 
     elseif args.Monat or args.Woche or args.Tag then
Zeile 353: Zeile 389:  
     --    OBSOLET  nach Bereinigung im ANR
 
     --    OBSOLET  nach Bereinigung im ANR
 
     if args.ISBNistFormalFalsch then
 
     if args.ISBNistFormalFalsch then
         if args.ISBN then
+
         local scream = "*** 'ISBNistFormalFalsch' veraltet;" ..
            args.ISBNformalFalsch = args.ISBN
+
                      " siehe [[WP:ISBNformalFalsch]]"
            args.ISBN            = nil
+
        falsch( scream )
        elseif args.ISBNistFormalFalsch ~= "" then
  −
            fehler( "Parameter",
  −
                    "Überflüssig: 'ISBNistFormalFalsch' ohne 'ISBN'" )
  −
        end
  −
        args.ISBNistFormalFalsch = nil
   
         fehler( "ISBNistFormalFalsch" )
 
         fehler( "ISBNistFormalFalsch" )
 
     end
 
     end
Zeile 409: Zeile 440:  
         fehler( "Modul", r )
 
         fehler( "Modul", r )
 
     end
 
     end
     return r .. fehlerliste()
+
     return r .. fehlerliste() .. Schrei
 
end -- f()
 
end -- f()
  
Cookies helfen uns bei der Bereitstellung von imedwiki. Durch die Nutzung von imedwiki erklärst du dich damit einverstanden, dass wir Cookies speichern.

Navigationsmenü