New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update locales-fa-IR.xml #157
Conversation
Sorry for second edition in a short short period of time. Also I would like to ask three questions: 1- Is it possible to localize disambiguation of citations? e.g. ([Authors], [Year][a]) >>> ([Authors], [Year]_[الف]) 2- Is it possible to localize punctuation marks? e.g [,] [;] >>> [،] [؛] 3- Mendeley does not support loading CSL locale files. Is it right?
Awesome! You've created a pull request to the Citation Styles Language locales repository. We'll get in touch soon (usually within a day or two). In the meantime, our automated test system will go ahead and run some checks on your pull request. In a few minutes you'll be notified of the test results. If you haven't done so yet, please make sure your locale file validates. To update the current pull request, visit the "Files changed" tab above, and click on the pencil icon (see below) in the top-right corner of your locale file to start editing. If you need assistance at any point, please leave a comment and we'll get back to you (feel free to write in Dutch, English, French, German, Portuguese, or Spanish). |
Yay! Your pull request passed all our automated tests. We'll take a look soon. |
No problem!
No. The current scheme ("a" through "z", then "aa" through "zz", etc.) is hard-coded. What kind of scheme do you wish to use?
There are currently only a few punctuation marks that can be localized. The delimiters used for dates (like the one you changed in this pull request), and quotation marks and the symbol used for page ranges (see Line 64 in 74a9e79
That said, you can create custom styles for Farsi and change most punctuation as required (CSL currently has a few hard-coded commas, I think; please report any issues you run into here).
No, as far as I know Mendeley periodically updates the CSL locale files it uses in new releases of Mendeley Desktop (not necessarily with every release), and I don't think it's possible yet for users to update the CSL locales by themselves. (see citation-style-language/styles#880 (comment); the Mendeley developer who replied to me in that thread, cpina, is on sabbatical, though, so Mendeley might be updating its CSL locale files even less frequently than normal). |
I forgot to delete this section: form="numeric-leading-zeros" @rmzelle Thank you for your prompt reply.
'... الف ب پ ت ث' instead of 'a b c d e etc'
OK. So I can create a separate style for Farsi. However I can't localize the delimiter used for publisher-place. e.g. [Tehran, Iran] تهران، ایران <<< تهران, ایران. And Mendeley MS Word Plugin doesn't support two style in a document. |
You don't want leading zeros for both the "text" and "numeric" formats?
Do you know what happens when you run out of letters? (as I mentioned above, in English, you normally would go from "x", "y", "z", to "aa", "ab", ac", etc., to "ba", "bb", "bc", etc.) |
Yes. By default, the year-suffix is placed automatically, but you can change its position (and surrounding punctuation) by using something like
CSL currently sees "publisher-place" as a dumb string (it doesn't recognize that the field contains "Tehran" and "Iran" separated by ", ", but instead just sees "Tehran, Iran"), so whatever is in the field is what's printed. Do you need both the English and Farsi translations within the same reference? |
I don't want that for text format.
Yes. We can use a same algorithm in Persian. Something like this: https://1drv.ms/i/s!Anh3Msh8ntSFhlBg9T9Yb8O7mZo7
Thanks. Done. How about RTL Text Direction? (for Bibliography in MS Word, as default). It does change to LTR, if I add a citation.
No. I mean, sometimes we have English references; sometimes we have Farsi references (entirely Farsi); sometimes we have both of them and should be list in a document. and we can't use two style in a document. I think that's a problem related to Mendeley. I Trying to solve this problems for a lot of people who lives in middle east, absolutely with your help. |
Fixed: b01a5e4
Okay, great. Issue created (citation-style-language/schema#136), although it might be a while before we can add support for non-English year suffixes.
What happens, exactly? The whole citation changes to LTR whenever there is year-suffix disambiguation?
That's a limitation in CSL that we're aware of. It's a priority to add support for references in different languages in a single bibliography, but again it might take a while. |
@rmzelle Thank you so much.
I made a short video to explain this problem. (20s/ 804kb). |
So any time Mendeley refreshes the bibliography, it becomes LTR? |
@rmzelle Yes, exactly. |
CSL is agnostic about page/number-of-pages. You can have both for the same item, in theory, though that'd be highly unusual in practice. In Mendeley, it does indeed look like it behaves like you say. In Zotero, for example, "Pages" and "# of Pages" are differently named fields, which I think is a better solution. For your RTL-->LTR issue, in the end that's Mendeley, not CSL, too, but see if Mendeley applies a Word style (see https://support.office.com/en-us/article/Customize-styles-in-Word-D38D6E47-F6FC-48EB-A607-1EB120DEC563 ) to the bibliography. You may be able to fix that to RTL. |
CSL has two separate variables, "number-of-pages" and "page", but Mendeley might only be using the latter (incorrectly). |
@fbennett, do I recall correctly that you did some work to get RTL to work correctly in citeproc-js? Could you take a brief look at #157 (comment), and tell us whether you think this is a problem in citeproc-js or Mendeley? Does citeproc-js automatically apply RTL for styles used with RTL locales? |
@adam3smith @rmzelle Thank You. |
@rmzelle There is some (long-stale) code in the processor that attempts to force RTL on items set to certain languages ( |
@Hamedheydari is using Mendeley, so that wouldn't work.
Ah, yes, if you have mixed references in RTL and LTR languages in a single bibliography, this can't be fixed by modifying the word processor style. |
I'll write to the developers there with the suggestion, so they can pick it up. |
You have good contacts at Mendeley? |
Just @cpina (hi, Carles, welcome to the issue :) |
Carles is on sabbatical; specifically (and I'm not making this up) on a boat circumnavigating antarctica. |
Oh yes, of course. How could I have forgotten that. Silly me. |
Hi. I'm Sorry for second edition in a short time period.
Also, I would like to ask you three questions:
1- Is it possible to localize the letters of disambiguation of citations? e.g. ([Authors], [Year][a]) >>> ([Authors], [Year]_[الف])
2- Is it possible to localize punctuation marks? e.g. [,] [;] >>> [،] [؛]
3- Mendeley does not support loading CSL locale files. Is it right?