wg030 / biblatex-iso690_2021

A temporary repository for the ISO 690:2021 Style (beta)
2 stars 1 forks source link

[Language] Czech #3

Closed vactomas closed 2 months ago

vactomas commented 2 months ago

This pull request aims to add support of Czech language (citation norm ČSN ISO 690:2022) to this package.

wg030 commented 2 months ago

Thanks a lot for that great contribution!

I see that some elements like foreword have not been translated by you yet. Hence I would ask @michal-h21 here for his support to find a good translation since he speaks Czech, too.

I also see that you have added some new bibstrings like director or pianist. That's ok in gerneral as long as it fits to the ISO norm, but we should make sure that all existing languages always contain the same elements so that we don't mess up.

michal-h21 commented 2 months ago

I've found three missing strings: foreword, introduction, and afterword. Here is a translation:

% non obvious primary creators [see 7.2.2 EXAMPLE 1, p. 26]
foreword = {{p\v{r}edmluva}{p\v{r}edml\adddotspace}},
introduction = {{\'{u}vod}{\'{u}v\adddotspace}},
afterword = {{doslov}{dosl\adddotspace}},

I've noticed that there are a lot of strings in the LBX file that should be included in the default BibLaTeX strings. I don't think it is necessary to include them in this translation file. It is possible to reuse them using \InheritBibliographyExtras and \InheritBibliographyStrings.

wg030 commented 2 months ago

I've found three missing strings: foreword, introduction, and afterword. Here is a translation:

Nice, thank you! What about cataloguedin, compiler and compilers? They are missing, too, as far as I can see.

I've noticed that there are a lot of strings in the LBX file that should be included in the default BibLaTeX strings. I don't think it is necessary to include them in this translation file. It is possible to reuse them using \InheritBibliographyExtras and \InheritBibliographyStrings.

Yes, that's true. However a redundancy does not do any harm and moreover some just seem to be redundant, but are actually not because they have a diffrent translation (at least in German). I will have a closer look at which we can get rid of in the for the next beta version.

michal-h21 commented 2 months ago

Nice, thank you! What about cataloguedin, compiler and compilers? They are missing, too, as far as I can see.

Ah, I missed these:

cataloguedin = {{katalogizov\'{a}no v}{katalogizov\'{a}no v}},
compiler = {{zpracovatel}{zpracovatel}},
compilers = {{zpracovatel\'{e}}{zpracovatel\'{e}}},
vactomas commented 2 months ago

Missed those. Thanks. I'll add them.

@michal-h21 You mentioned duplicates in LBX with the BibLaTeX package. What would be the correct way to check for those?

michal-h21 commented 2 months ago

@vactomas the reference translation file is this one: https://github.com/plk/biblatex/blob/dev/tex/latex/biblatex/lbx/english.lbx

I wrote a small script that can test language strings:

local function load_keys(filename)
  local f = io.open(filename, "r")
  local content = f:read("*all")
  f:close()
  local key_string = content:match("(\\DeclareBibliographyStrings%b{})")
  local keys = {}
  for key in key_string:gmatch("(%w+)%s*=") do
    keys[key] = 1
  end
  return keys
end

local first = load_keys(arg[1])
local second = load_keys(arg[2])

for key, count in pairs(first) do
  first[key] = first[key] + (second[key] or 0)
end

for key, count in pairs(second) do
  first[key] = first[key] or 0
end

for key, count in pairs(first) do
  print(count, key)
end

It can be used in this way:

 $ texlua test-lbx.lua czech-iso690_2021.lbx `kpsewhich english.lbx`

It will print all bibliography strings and count. 2 means that the string is contained in both files, 1 that it is only in czech-iso690_2021.lbx, and 0 means that it is only in english.lbx:

0   bytranslatoranin
1   engineer
0   idemsm
0   translatorsin
0   idempn
0   founders
1   composers
0   involumes
0   byannotator
0   idempf
0   idempp
0   phdthesis
1   audiobook
0   founder
0   reprint
0   columns
0   pagetotals
1   copied
1   softwareprogrammers
1   arrangers
0   translatoran
0   versetotals
0   byeditoraf
0   withcommentator
0   editortrfo
0   translatorsanfo
0   translatorscoin
0   organizer
0   in
0   translatorcofo
1   photographerofanothercreatorswork
0   redactors
1   engineers
0   withintroduction
0   verse
0   version
2   introduction
1   adaptationof
0   bycommentator
0   fromhungarian
0   editoraf
0   ibidem
2   editor
0   citedas
0   byeditortraf
1   photographers
1   kindleebook
1   commentaryon
0   editorscoaf
0   editorscoin
0   fromgalician
0   editorcofo
1   online
0   byeditoran
2   commentator
0   langspanish
0   paragraphtotal
0   seenote
0   quotedin
0   backrefpage
0   issue
0   byeditoranaf
0   fromjapanese
0   beforechrist
0   autumnN
2   number
0   thiscite
0   editortrcoin
0   byreviewer
0   translatorin
0   reprintas
0   bibliography
0   may
0   lines
0   ofseries
0   byeditorcoin
0   library
0   bytranslatorcofo
0   translationas
0   editorstrcoaf
0   translatorsfo
1   surveyors
0   translatorsanin
0   column
0   columntotal
0   langfinnish
0   byeditortrin
0   byeditoranin
1   photographer
0   fromlatin
0   forthcoming
0   byeditorfo
1   cast
0   paragraphtotals
0   byeditortrcoin
0   translatorscofo
0   editorsfo
0   bycollaborator
0   september
0   byeditortrcoaf
1   productioncompany
0   astitle
0   chapter
1   copyist
0   editorsco
0   byeditoranfo
0   october
1   listedat
0   editorcoin
0   mathesis
0   patreq
0   bytranslator
1   authors
0   editoranaf
0   august
1   physsurrogatefrom
0   winter
0   byeditortranfo
2   compiler
2   annotators
0   fromitalian
1   cartographers
0   bytranslatorcoaf
0   jourser
0   bypublisher
0   langcatalan
0   fromestonian
1   reissued
0   opcit
0   editoranfo
0   idempm
1   patentapplicants
0   bytranslatoranfo
0   november
1   surrogatefrom
1   architect
1   metered
1   originallyfrom
2   part
1   performanceof
0   editortrin
0   pagetotal
0   file
0   byeditortranin
0   byeditor
0   columntotals
2   volumes
0   byeditortran
0   and
0   editorco
0   fromfrench
0   confer
0   byeditorco
0   fromgreek
0   langlithuanian
1   graphicdesigner
0   withafterword
2   reviewof
0   translatorcoin
0   editorstrcoin
0   langserbian
0   sequentes
0   langpolish
0   fromdutch
0   translatorscoaf
0   langromanian
0   translatoraf
0   patenteu
0   bytranslatorco
1   directorsofmotionpictures
1   systemdesignersofsoftware
1   surveyor
0   editorstranfo
0   see
0   editortranin
1   patentapplicant
0   backrefpages
0   editortr
1   publisher
0   february
0   langdutch
0   editortranfo
1   onlineinformationprovider
2   urlseen
0   url
0   annotations
0   line
0   linetotal
0   editorsanin
0   summer
0   april
0   withforeword
0   S1
0   shorthands
0   inpreparation
1   inventors
0   translatorsco
0   fromnorwegian
1   songwriters
2   editors
0   editorstran
0   byredactor
1   firstcast
0   patreqde
1   archivedcopy
1   librettist
0   fromczech
0   translatorco
0   langmarathi
0   july
0   bytranslatorcoin
1   librettists
0   passim
0   bytranslatoran
0   idemsf
0   fromlithuanian
1   photographersofanothercreatorswork
0   editorscofo
0   editorfo
0   december
0   fromfinnish
1   conductor
1   urlalso
0   byeditortrcofo
0   Q4
0   S2
0   audiocd
1   arranger
0   Q3
1   graphicdesigners
1   archived
1   restricted
0   winterS
0   translatoranin
0   withannotator
0   section
0   organizers
0   summerN
0   editorstrin
0   Q2
1   composer
0   langbulgarian
1   softwareprogrammer
1   issuingbody
1   patentee
1   pennameof
0   editorstr
1   lyricist
0   langczech
0   candthesis
1   onlinehost
0   sectiontotals
1   artist
0   editorstranin
0   langdanish
0   summerS
0   langfrench
0   prepublished
0   byeditorin
0   inseries
0   langgreek
1   cataloguedin
1   distributor
0   idemsn
0   byfounder
2   translators
0   jourvol
0   editortranaf
0   QD1
2   pages
0   langrussian
1   conceived
0   andothers
1   holder
1   guitarist
0   editorin
0   sequens
0   circa
0   fromslovene
0   langportuguese
0   langlatvian
0   bytranslatoraf
0   patreqeu
0   origpubas
0   langslovene
0   editorsaf
1   illustrator
0   langestonian
0   fromamerican
0   book
0   langswedish
0   editorstrfo
0   editoranin
0   langturkish
0   langlatin
0   editortrcoaf
0   references
2   foreword
0   translatorsanaf
0   editortraf
0   patreqfr
0   byeditorcoaf
1   applicationdate
2   compilers
1   performerofmusic
0   fromturkish
0   frombrazilian
0   bytranslatorfo
2   urlfrom
1   print
0   editorstrcofo
0   reprintof
0   collaborators
0   byeditortranaf
1   digitised
1   pseudonymof
0   frombulgarian
0   loccit
0   resreport
1   cc
0   countryus
0   fromcatalan
1   looseleaf
0   bathesis
0   fromcroatian
0   fromlatvian
0   QD2
0   translatorcoaf
1   author
2   page
0   fromgerman
0   byauthor
1   artists
0   patentde
0   annotation
0   editortrcofo
1   engravers
1   mappingagency
0   langgalician
0   frompolish
0   reprintfrom
0   collaborator
0   langnorwegian
1   editor2s
0   newseries
0   byreviser
0   origpubin
1   reviewers
1   performerofdrama
1   performersofmusic
0   editorstrco
1   reprinted
1   illustrators
2   volume
0   fromromanian
1   onlinehandleof
1   at
0   fromrussian
0   langjapanese
1   facsimiled
1   issuancedate
0   fromslovak
0   editorsanaf
2   edition
0   annodomini
0   inpress
0   countryep
2   translationof
0   paragraph
0   fromspanish
0   bytranslatoranaf
0   patentuk
0   langitalian
0   editorstranaf
0   langenglish
0   countryeu
0   oldseries
0   translatorsan
0   langcroatian
0   countryfr
0   sectiontotal
0   continuators
1   pianist
0   patent
0   countryde
1   guitarists
0   paragraphs
0   fromportuguese
0   patentus
0   versetotal
0   langslovak
0   techreport
0   patrequk
0   autumnS
0   abstract
0   beforecommonera
0   translatoranaf
0   patentfr
0   spring
0   byeditortrco
1   paperback
0   commonera
1   director
1   legaldepositfrom
0   langbasque
0   springS
0   march
0   langamerican
1   draughtsmen
0   Q1
0   QD3
1   performersofdrama
1   editions
0   translatorsaf
0   editoran
1   abridgementof
0   springN
0   countryuk
0   langbrazilian
0   am
0   pm
0   sections
0   datacd
0   byorganizer
0   editorcoaf
0   langukrainian
1   pianists
0   fromdanish
1   paywall
0   bytranslatorin
0   fromserbian
0   software
0   editorstraf
0   bycontinuator
0   linetotals
1   directorofmotionpictures
1   conductors
1   lyricists
1   nicknameof
1   digsurrogatefrom
0   frombasque
1   directors
1   nolocation
1   via
2   afterword
0   patrequs
0   fromenglish
0   commentary
2   commentators
0   andmore
0   langgerman
1   inventor
0   fromswedish
0   continuator
0   byeditortr
0   byeditorcofo
0   winterN
0   autumn
0   editorsin
0   june
1   nopublisher
0   translatorfo
2   translator
1   annotationon
2   annotator
0   bycompiler
0   idem
0   translatoranfo
0   redactor
1   reviewer
1   draughtsman
2   revisers
1   reproductionof
0   editortran
1   holders
1   copyists
1   cartographer
1   includes
0   translationfrom
0   submitted
1   engraver
1   songwriter
0   editortrco
0   fromukrainian
2   reviser
2   seealso
0   editorsanfo
0   verses
1   systemdesignerofsoftware
2   nodate
0   byeditortrfo
0   editorsan
1   anonymous
0   frommarathi
1   item
0   january
0   langhungarian
1   patentees
1   boardbook
1   digitalrecording
1   architects
1   event
1   stagenameof
1   editor2
vactomas commented 2 months ago

Alright. Great work with the script. What would be the ideal next step?

michal-h21 commented 2 months ago

I guess the fields with count 2 can be removed from the translation file. I thought there will be more of them. The script can be also executed against the original biblatex-iso translation file:

 $ texlua test-lbx.lua czech-iso690_2021.lbx `kpsewhich czech-iso.lbx`

There are too some duplicate terms:

1   archived
1   nicknameof
1   reviewer
1   edition
1   arranger
1   arrangers
1   songwriter
1   afterword
1   commentators
1   guitarists
1   print
1   photographersofanothercreatorswork
1   nolocation
1   architect
2   inventor
1   reproductionof
1   reprinted
1   graphicdesigner
1   guitarist
1   onlineinformationprovider
1   pennameof
1   productioncompany
1   digsurrogatefrom
1   performanceof
1   issuingbody
1   photographers
1   directors
1   commentator
1   lyricists
0   bydirector
1   compilers
1   engineers
2   director
1   inventors
1   systemdesignersofsoftware
1   publisher
1   audiobook
0   andothers
1   restricted
1   originallyfrom
1   metered
1   copyists
1   reissued
1   onlinehandleof
1   introduction
1   editor
1   editions
1   kindleebook
1   surveyors
1   adaptationof
1   artist
1   holders
1   compiler
1   cc
1   engineer
1   librettist
1   translator
1   authors
1   facsimiled
1   engravers
1   nodate
1   cartographers
1   draughtsman
1   copyist
1   illustrator
1   draughtsmen
1   photographer
1   paperback
1   via
1   patentee
1   reviewers
1   boardbook
1   patentapplicant
1   composer
0   publication
0   byinventor
0   film
0   application
0   refreshedon
0   bysupervisor
1   foreword
1   pages
1   issuancedate
1   illustrators
1   page
1   copied
1   performerofmusic
1   includes
1   reviewof
1   seealso
1   annotationon
1   event
2   urlseen
1   translationof
1   looseleaf
1   softwareprogrammers
1   onlinehost
1   performersofdrama
1   commentaryon
1   digitalrecording
1   item
1   cast
1   translators
1   paywall
1   legaldepositfrom
1   engraver
1   reviser
1   physsurrogatefrom
1   archivedcopy
1   surrogatefrom
1   abridgementof
1   distributor
1   annotator
1   directorofmotionpictures
1   nopublisher
2   urlalso
1   firstcast
2   urlfrom
1   conductors
1   editor2
1   conductor
1   conceived
1   photographerofanothercreatorswork
1   part
1   number
1   volumes
1   performersofmusic
1   cataloguedin
1   patentees
1   softwareprogrammer
1   volume
1   architects
1   songwriters
1   digitised
1   revisers
1   anonymous
1   patentapplicants
1   performerofdrama
1   stagenameof
1   lyricist
1   directorsofmotionpictures
2   online
2   at
1   pianists
1   pseudonymof
1   author
1   editors
1   artists
1   surveyor
1   graphicdesigners
1   cartographer
1   listedat
1   applicationdate
1   annotators
1   pianist
1   editor2s
1   systemdesignerofsoftware
1   librettists
1   holder
1   composers
1   mappingagency
wg030 commented 2 months ago

I wrote a small script that can test language strings:

Nice code. That looks pretty useful for finding the redundant bibliography strings! 😀 It will likely be a good tool when we later try to integrate this temporary repo into the original one I guess.

wg030 commented 2 months ago

What would be the ideal next step?

In order not to mess up too much, I would suggest that you fix the missing expressions which @michal-h21 translated and then we can already merge this PR as a start. Next we try to deal with the redundants, which are now already idendified thanks to @michal-h21's script. I already opened issue #5 for that.

vactomas commented 2 months ago

I have removed the duplicates. Adding the missing expressions would only lead to duplication. That said, I ran into an interesting issue. At the beginning of the document, it prints yricist. Not sure where that comes from, but it goes away once I stop using biblatex.

wg030 commented 2 months ago

It turns out the missing comma was actually my bad since it already existed in the empty langage template. I corrected that, too, so that I think we are ready to merge this PR. That's a decent and sufficient start now. However the german and english language still needs to be adjusted accordingly, but I will do it with the next update v0.4.