citation-style-language / locales Goto Github PK
View Code? Open in Web Editor NEWOfficial repository for Citation Style Language (CSL) locale files.
Home Page: https://citationstyles.org/
Official repository for Citation Style Language (CSL) locale files.
Home Page: https://citationstyles.org/
Is it possible to specify translations of placenames or thesis genres in the locale files?
If a bibliography.yaml
has an entry:
publisher-place: London
Can for example Pandoc then render the citation either London or Londra etc. based on the language of the article it is being rendered in?
In locales-he-IL.xml verb short forms are still in English. Is this intentional or should we localize those terms as well?
I use Pandoc to generate the bibliography with the help of CSL file as main.docx
:
pandoc -C input.md -o main.docx
Most of the cases are perfect. But one issue is that the order of the Chinese bibliography is unexpected. As usual, the Chinese bibliography should be sorted by the pinyin or stroke of authors. However, as the screenshot below shows, it's not sorted by neither of them.
The desired outputs based on the pinyin of authors should be:
(li jia min) 李佳洺, 余建辉, 张文忠, 2019. **采煤沉陷区空间格局与治理模式[J]. 自然资源学报, 34(04): 867–880.
(qin yang) 秦扬, 胡实, 张小龙, 2012. 论我国石油天然气矿权权利冲突及解决机制[J]. 生态经济, (01): 69–72.
(tang xiaohui) 唐孝辉, 2016. 山西采煤沉陷区现状、危害及治理[J]. 生态经济, 32(02): 6–9.
(xu zhanjun) 徐占军, 侯湖平, 张绍良, 等, 2012. 采矿活动和气候变化对煤矿区生态环境损失的影响[J]. 农业工程学报, 28(05): 232–240.
(zeng ming) 曾明, 廖瑾莹, 2015. 利益失衡:社会稳定中的《资源诅咒》之源——基于A省矿区的调研[J]. 江西社会科学, 35(11): 213–218.
The style file used was downloaded here, which sorts the bibliography with the ascending order, but it might not work for Chinese texts.
And the data of bibliography was saved in the file ref.bib
:
@article{tangxiaohui2016,
title = {{山西采煤沉陷区现状、危害及治理}},
author = {{唐孝辉}},
year = {2016},
volume = {32},
pages = {6--9},
journal = {生态经济},
key = {tang xiao hui},
number = {02}
}
@article{xuzhanjun2012,
title = {{采矿活动和气候变化对煤矿区生态环境损失的影响}},
author = {{徐占军} and {侯湖平} and {张绍良} and {丁忠义} and {马昌忠} and {公云龙} and {刘严军}},
year = {2012},
volume = {28},
pages = {232--240},
journal = {农业工程学报},
key = {xu zhan jun hou hu ping zhnag shao liang},
number = {05}
}
@article{zengming2015,
title = {{利益失衡:社会稳定中的“资源诅咒”之源——基于A省矿区的调研}},
author = {{曾明} and {廖瑾莹}},
year = {2015},
volume = {35},
pages = {213--218},
journal = {江西社会科学},
key = {zeng ming liao jin ying},
number = {11}
}
@article{lijiaming2019,
title = {{**采煤沉陷区空间格局与治理模式}},
author = {{李佳洺} and {余建辉} and {张文忠}},
year = {2019},
volume = {34},
pages = {867--880},
journal = {自然资源学报},
key = {li jia min yu jian hui zhang wen zhong},
number = {04}
}
@article{qinyang2012,
title = {{论我国石油天然气矿权权利冲突及解决机制}},
author = {{秦扬} and {胡实} and {张小龙}},
year = {2012},
pages = {69--72},
journal = {生态经济},
key = {qin yang hu shi zhang xiao long},
number = {01}
}
By the way, I also tried to insert the same bibliographies with Zotero for Word, and it sorted them correctly. So I am quite confused with the issue as Pandoc and Zotero both use the the same CSL file. Thank you!
Everything is in the title. I'm not sure whether this is a conscious decision resulting from a discussion or whether this is an oversight, but I think "pp." is more common than "p." when multiple pages are cited. At least I know citation guidelines in France that require it.
The relevant part of locales-fr-FR.xml and locales-fr-CA.xml is:
p.
p.
In Mendeley reference manager, I am trying to follow the " Advanced functional materials" citation style. In this citation style, the reference format should be 1. A. B. Author 1, C. D. Author 2, Adv. Mater. 2020, 18, 2001086. But in my case, I only can get 1. A. B. Author 1, C. D. Author 2, Advanced Materials 2020, 18, 2001086. Can anybody help me to solve this issue?
for reference: I have attached author guidelines from advanced functional materials:
https://onlinelibrary.wiley.com/page/journal/16163028/homepage/author-guidelines
See https://forums.zotero.org/discussion/32447/ . Some locales (such as Chinese and Slovenian) use a symbol different from an ampersand, so it's desirable to be able to (re)define this term.
As discussed in that thread, there are three issues:
CMoS (14.162, 14.235) and MHRA both give 'fol.', plural 'fols' (with period in en-US, often omitted in en-GB) rather than the CSL 'f.', which occurs but is unusual. Should this be changed?
Hi, Thanks for your time, I have a problem in changing lauguage.
My Bibliography includes two language, 'en' and 'zh-CN', how can I change them adaptable?
Before I change this, is there some reason there's a branch and trunk directory here? That's a convention from CVS and SVN, but not the typically way you do it in a DVCS.
Hi!
I've been trying to redo the localisation file for the Ukrainian language since the current translation, unfortunately, doesn't meet my requirements.
Among other issues, I discovered one brutal: there is no neutral gender.
It is a problem because the Ukrainian language is fusional (links between words are expressed through the form of the word), unlike English, which is analytical and uses additional words for that purpose. The numerals we use for enumeration are more adjectives than nouns and therefore inflect in gender, case, and even number. There are 3 genders in Ukrainian: masculine, feminine, and neutral. The last one is not available in the code - the reason I'm writing to you.
Could you please help me to find any kind of solution?
Below there is the code I wrote. The other problem I found - no one seems to cite opus or folio much, but such types of documents I never found here, for example, thesis (dissertation). I would be happy to be wrong.
Best wishes
Bohdana
The translation overides CSL settings. Multiple pages should look like pp. 125-127 and not p. 125-127
I have noticed that the term presented at
contains the article "the" in English and "der" in German. This seems to be only required in some citation styles such as APA and Chicago while styles like AMA and NLM uses a colon instead of the article.
I'm not sure if this can be fixed easily but I figured I would log it as an issue in case it produces some useful discussion.
Problem in automatic translation of word 'and' between authors in citations in Spanish.
Before an author's name beginning by 'i' or 'hi' the conjunction 'y' ["and"] should be replaced by 'e'.
Ex.
**Blanco y Hidalgo, 2002.
**Vega y Ibañez, 2010.
should be written:
Blanco e Hidalgo, 2002.
Vega e Ibañez, 2010.
locales-pt-BR.xml is translating entries related to “editor” to “organizador” (= organizer), whereas there is the figure of the editor, which is different from the organizer.
These are the places that need correction:
<term name="editor">
<single>organizador</single>
<multiple>organizadores</multiple>
</term>
<term name="editorial-director">
<single>editor</single>
<multiple>editores</multiple>
</term>
[...]
<term name="editor" form="short">
<single>org.</single>
<multiple>orgs.</multiple>
</term>
[...]
<term name="editor" form="verb">organizado por</term>
[...]
<term name="editor" form="verb-short">org.</term>
Should be
<term name="editor">
<single>editor</single>
<multiple>editores</multiple>
</term>
<term name="editorial-director">
<single>diretor editorial</single>
<multiple>diretores editoriais</multiple>
</term>
[...]
<term name="editor" form="short">
<single>ed.</single>
<multiple>eds.</multiple>
</term>
[...]
<term name="editor" form="verb">editado por</term>
[...]
<term name="editor" form="verb-short">ed.</term>
(By the way: the pt-PT xml is correct.)
Depends on this CSL-Schema issue: http://bitbucket.org/bdarcus/csl-schema/issue/8/add-range-delimiter-option-to-date-part
With value "1.0" for CSL 1.0-compliant locale files?
Is there any way to specify the delimiter, because Arabic text uses a different comma and semi-colon: ، and ؛ instead of , and ; (the codepoints for arabic are: u+060c for the comma, u+061b for the semicolon)?
Locale files are useful, but the common local files are not "common" sometimes.
For example, we use quotation marks “”
and ‘’
sometimes in Chinese, not 《》
and 〈〉
all the time. While the common local files in the figure below is arbitrary for this kind of usage.
And the local file is at https://github.com/citation-style-language/locales/blob/master/locales-zh-CN.xml
Due to the quotation mark in the local file, the bibliography with quotations like “” would be converted as 《》, while I actually want is the original “”
.
For instance, the output is like:
And in BibTeX file it’s like:
@article{caijingjing2011,
title = {“分山到户”或“共有产权”:集体林权制度改革的社会—生态关键变量互动分析——以福建省5个案例村为例},
author = {{蔡晶晶}},
date = {2011},
journaltitle = {经济社会体制比较},
pages = {154--160},
number = {06}
}
Although the issue could be resolved by changing the default-locale
to en-US
, I still have a question, when I set default-locale
as a specific language like zh-CN
in the CSL file. Then how the CSL file fetches the data from the local translation, it's from the GitHub URL or local file on my disk? Thanks!
Hello, I have submitted a PR for adding Hindi (India) in #216. The build is failing because there is no entry for hi-IN in locales.json
.
1) The file "locales.json" must define a primary dialect for every language (e.g. "de-DE" for "de")
Failure/Error: expect(@locale_file_languages - @primary_dialects.keys).to eq([])
2) The file "locales.json" must define language names for every locale
Failure/Error: expect(@locale_file_locales - @language_names.keys).to eq([])
But when we add the expected changes to locales.json, the build fails because it doesn't expect that file in the PR.
bundler: failed to load command: sheldon (/home/runner/work/locales/locales/vendor/bundle/ruby/2.7.0/bin/sheldon)
RuntimeError: Unexpected locales file locales.json in pull request
Please simplify this process. Since locales file is going to go through the PR anyway, perhaps allow contributors to submit changes?
Going through quote-mark conventions, I've realized that CSL lacks an Albanian locale.
How about protecting short terms like "o. A." ("anonymous" in German locale) with non-breaking spaces, to prevent line breaks? I could do this for the German locale files.
I just find book
and chapter
terms are used as both item types and locators in locale files. For example:
Line 108 in 62dcca6
Lines 248 to 251 in 62dcca6
The duplicate term definition may cause unexpected result in citeproc output. Here is the full list of duplicate terms: interview
, book
, chapter
, book,form:short
, and chapter,form:short
.
Additionally, PR #254 fixed missing form="short"
attribute in only en-US
and en-GB
but the missing attributes in other languages cause duplicates. I'm happy to make a PR to resolve them.
I just had a look in the [[http://www.dokpro.uio.no/perl/ordboksoek/ordbok.cgi?OPP=m%fl.|dictionary]], and it seems
<term name="et-al">m.fl.</term>
should be
<term name="et-al">mfl.</term>
in locales-nb-NO.xml and locales-nn-NO.xml
I've found some old discussions mentioning them. It has been raised again there (scroll down to "Limites et points à régler") about ISO 690.
@rmzelle ? @adam3smith ?
As raised at zotero/zotero#623 (comment), we should clearly define the primary dialects for each language tag, as described in the CSL specification: http://citationstyles.org/downloads/specification.html#locale-fallback
We can put this information locales.json, but we'd have to restructure it a bit. Maybe the following works?:
{
"locales": {
"de-AT": [
"Deutsch (Österreich)",
"German (Austria)"
],
"de-CH": [
"Deutsch (Schweiz)",
"German (Switzerland)"
],
"de-DE": [
"Deutsch (Deutschland)",
"German (Germany)"
],
"en-GB": [
"English (UK)",
"English (UK)"
],
"en-US": [
"English (US)",
"English (US)"
]
},
"primary-dialects": {
"de": "de-DE",
"en": "en-US"
}
}
Not sure if I can directly open an issue here or in Zotero forum. Please redirect me if I am in the wrong place...
For patents inventors, some styles need an introduction label such as "Inventor:" before the name (for ex. ISO 690 standard).
Even if Zotero is currently not supporting an "inventor" author type, I think it could be useful to define an term for inventor in CSL locales.
M. Saby
There is a slight discrepancy between the short role and the short verb role term for editors in the German locales. Short role is "Hrsg.", but short verb role is "hg. von". Should this not be harmonized, i.e. either "Hg." and "hg. von" or "Hrsg." and "hrsg. von"? As far as I can tell, "Hrsg."/"Hg." and "hrsg. von"/"hg. von" are equally common.
In http://raw.github.com/citation-style-language/locales/master/locales-de-DE.xml,
<term name="volume" form="short">
<single>Bd.</single>
<multiple>Bd.</multiple>
</term>
is incorrect, should be
<term name="volume" form="short">
<single>Bd.</single>
<multiple>Bde.</multiple>
</term>
See http://www.duden.de/rechtschreibung/Band_Buch
“Band, der […] einzelnes Buch [als Teil eines größeren Druckwerkes, einer Bibliothek]; Abkürzung: Bd., Plural: Bde.”
Edit: Same holds for locales-de-AT.xml and locales-de-CH.xml
The German locales use ampersands for joining multiple roles, e.g. "Herausgeber & Übersetzer" for editortranslator. Actually, ampersands should be used in the context of business only. So, traditionally, one would expect "Herausgeber und Übersetzer" or "Hrsg. u. Übers." for the short form (i.e. using the very German "and" term as it is defined in the locales themselves).
Should probably be added to csl-terms.rnc
locales-ar-AR
The en-US locale contains the following verb-short term nodes:
<!-- SHORT VERB ROLE FORMS -->
<term name="container-author" form="verb-short">by</term>
<term name="director" form="verb-short">dir.</term>
<term name="editor" form="verb-short">ed.</term>
<term name="editorial-director" form="verb-short">ed.</term>
<term name="illustrator" form="verb-short">illus.</term>
<term name="translator" form="verb-short">trans.</term>
<term name="editortranslator" form="verb-short">ed. & trans. by</term>
The preposition "by" is missing from director, editor, editorial-director, illustrator, and translator, although it is present on container-author and editor-translator. I don't know whether this is set up this way by intention, but it is inconsistent, and seems inconsistent with the meaning of the attribute.
Unfortunately, verb-short is used in 81 styles in the repository, and we can assume that it is meant to return the term without the preposition. I don't know how many styles would return container-author or editortranslator (and so expect the preposition to be present on at least some cite forms).
I haven't checked whether other locales reflect the English or follow the semantics of the attribute, but that would be a concern as well. It seems to me that the terms in the verb-short group should be consistent, but I don't have any ideas about how to get there without putting in a lot of work or risking a lot of complaints. Without style-level tests it's hard to judge how much of an outcry there would be if the prepositions were just added where they are missing.
(I recently started shipping a static locale set with citeproc-js for use in testing, and noticed the problem when a flurry of tests failed after I idly "fixed" the terms in the static bundle. I'll adjust the tests to reflect the "fixed" values, but the issue remains in the official locales.)
I hope I am right with my kind of posting here:
In ordinals (line 63 to 79) there are the english ordinals. I write the german ordinals after the corresponding line.
<!-- ORDINALS -->
<term name="ordinal-01">st</term> 1.
<term name="ordinal-02">nd</term> 2.
<term name="ordinal-03">rd</term> 3.
<term name="ordinal-04">th</term> 4. (and so on)
<!-- LONG ORDINALS --> in the order masculin - feminin - neutrum, edition in german ist feminin.
<term name="long-ordinal-01">first</term> erster, erste, erstes
<term name="long-ordinal-02">second</term> zweiter, zweite, zweites
<term name="long-ordinal-03">third</term> dritter, dritte, drittes
<term name="long-ordinal-04">fourth</term> vierter, vierte, viertes
<term name="long-ordinal-05">fifth</term> fünfter, fünfte, fünftes
<term name="long-ordinal-06">sixth</term>sechste, sechster, sechstes
<term name="long-ordinal-07">seventh</term> siebter, siebte, siebtes
<term name="long-ordinal-08">eighth</term> achter, achte, achtes
<term name="long-ordinal-09">ninth</term> neunter, neunte, neuntes
<term name="long-ordinal-10">tenth</term> zehnter, zehnte, zehntes
Much thanks.
Markus
"page" and "pages" have been translated to "side" and "sider" in Norwegian. However, "sider" is the indefinite plural form of "side". Won't the use in CSL always be definite? I.e. it will always be used in connection with a definite range of pages?
The definite plural form is "sidene".
I've requested feedback from fellow translator @unhammer on the issue.
As described in:
http://sourceforge.net/mailarchive/message.php?msg_name=53208a5f0909091521o7fd1072amdeb05ec343ce20ee%40mail.gmail.com
The only niggle is that "references" should probably be renamed to "reference" for consistency. Maybe we should make this change (none of the styles in the repository use the existing "references"-term).
Regarding this: https://forums.zotero.org/discussion/83053/mixed-rtl-and-ltr-docs
Currently, the term "and" and Hebrew does appear without a leading space. I don't think that is the supposed behavior, but I don't really understand why that happens. Any hints?
Hi,
This issue is somewhat related to issue #6. There seems to be some disagreement whether one should translate 'et al.' to 'mfl.', 'm.fl.' or just simply 'et al.' in Norwegian.
I'm not going to argue about which one is right, because I expect different fields have different habits anyways.
Is there any way by which multiple 'et al.' translations can be added to the locale sheet in such a way that the user of a specific style gets to pick the one that suits him/her best?
I don't remember if that was on purpose or an oversight, but looks like the term for collection-number
is missing. Any objections if I add it?
Motivation
We using your project in our PHP project.
The best way to manage PHP(and any other) project requirements is package checking/updating.
The most popular package manager is Composer.
Potential solving
Can you make composer package from your project?
Example of composer.json file which must be in the root folder of project attached(archived for attaching).
composer.json.zip
Have done some minor changes to nn and nb. You'll find them at http://github.com/unhammer/zotero-nn/
All punctuation changes you did before commiting here should be included.
(Similar request as citation-style-language/styles#2372)
I aim to support getting the CSL styles packaged for debian so that they are available for JabRef . Debian pays attention that the authors of contributions are properly attributed.
CC-BY requests that the original authors are mentioned. Is it possible to include the author at each XML file? For instance, https://github.com/citation-style-language/locales/blob/master/locales-tr-TR.xml does not show an author and there also doesn't seem an AUTHORS file in the root of the repository.
See edition in http://bitbucket.org/bdarcus/csl-locales/src/5a1d350e9a91/locales-en-US.xml
This probably can just be removed.
This is linked to the shift from include-period
to strip-periods
.
Using APA (American Psychological Association 6th edition) with citation and bibliography language set to English, we have a bibliography entry that looks like this:
CSL search by example. (n.d.). Retrieved December 15, 2012, from http://editor.citationstyles.org/searchByExample/
If we change the language to Slovenian, we now get a bibliography entry that looks like this:
CSL search by example. (b. d.). Pridobljeno 15. december 2012, od http://editor.citationstyles.org/searchByExample/
From is correct in English, but not in Slovenian. It should be s
instead of od
, this is the correct version of it:
CSL search by example. (b. d.). Pridobljeno 15. december 2012, s http://editor.citationstyles.org/searchByExample/
Here is a guide by University of Ljubljana that explains how to make APA citations, if you scroll down you have a few examples that confirm my issue: http://vodici.pef.uni-lj.si/subjects/guide.php?subject=citiranje
I have fixed this issue locally by editing locales-sl-SI.xml and changing the from
term:
<term name="from">s</term>
I do not know if the term from is used anywhere else and if this is a proper solution, it feels more like a hack as from
does indeed translate to od
, while s
would actually translate to with
. I've created a PR with my change.
The terms for BC and AD are reversed in the norwegian langauge files locales-nb-NO.xml and locals-nn-NO.xml. The correct should be:
<term name="ad">evt.</term>
<term name="bc">fvt.</term>
(evt = etter vår tidsregning = after our time reckoning = after year 0)
(fvt = før vår tidsreging = before our time reckoning = before year 0)
Running pandoc on ubuntu 22.04:
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5
Default user data directory: /home/rune/.local/share/pandoc or /home/rune/.pandoc
Copyright (C) 2006-2020 John MacFarlane
Ordinals in Swedish are written with a colon after the number, and before the ordinal character.
Reference: Ola Karlsson (red). 2008. Svenska skrivregler (Rules for writing in Swedish), p. 161. 3rd edition. Liber, Stockholm.
A few strings are in English. The attached patch fixes them. I also added the term for »collection-editor« so de-AT will show the same features as de-DE.
For short translation of "et al." in Slovenian language, the correct translation would be "idr.", which would correspond to "and others" which is translated correctly as "in drugi".
Not sure if this bit belongs here, but there is no "&" sign in Slovene, and when quoting in APA6 style, for instance "(Perls, Hefferline & Goodman, 1994)" is not correct. Correct way would be "(Perls, Hefferline in Goodman, 1994)"
I would like to work on the locale for Japanese, which is not yet complete. But there is an additional problem in Japanese, since
There are many other cases, such that it might be helpful to set up several Japanese locales. But these would not fit to the official language code.
Another solution is not to use a locale for Japanese papers at all and instead write styles for Japanese journals with fixed prefixes and suffixes.
Since I am now setting up several styles for Japanese journals in the Humanities, I would like to get this problem solved before starting with CSL.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.