plk / biblatex-apa

APA style for BibLaTeX
88 stars 48 forks source link

Incorrect: Dutch dates are shown as "month day" instead of "day month" #213

Closed LukeSerne closed 11 months ago

LukeSerne commented 1 year ago

Description The dates shown in the bibliography are formatted in the wrong way for the Dutch language. As can be demonstrated with the below MWE, the dates are shown like (2023, juli 3) instead of (2023, 3 juli). While the below MWE uses the @online type, this problem also occurs for @book, @report and probably others as well.

MWE

\documentclass{scrbook}
\usepackage[english,dutch]{babel}
\usepackage[style=apa, backend=biber]{biblatex}

\begin{filecontents}{\jobname.bib}
@online{test-2023,
    author = {Jan Janssen},
    title = {Voorbeeldpagina},
    url = {https://example.com/},
    date = {2023-07-03}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

Observed output Janssen, J. (2023, juli 3). Voorbeeldpagina. https://example.com/

Expected output Janssen, J. (2023, 3 juli). Voorbeeldpagina. https://example.com/

plk commented 1 year ago

That's possible as I have just put in generic formats for locales I don't have enough information about. If you can tell me what the correct short and long versions of Dutch dates should be, I'll correct the localisation.

LukeSerne commented 1 year ago

I am not sure what you mean by short and long versions of dates. If the day and month part of a name are known, they are included, otherwise, it's just the year (or z.d. if there is no date). This reference (in Dutch) might be helpful, as it describes the differences between Dutch and English APA.

The date after the author name(s) has the format (<year>, <day> <monthname>), where <monthname> is lower-cased. The date in "Retrieved from" has the format <day> <monthname> <year> - again <monthname> is lower-cased and there is no comma in the date. So, an example for an online source in both English and Dutch (with dates with different levels of specificity):

English: Janssen, J. (2023, July 3). Voorbeeldpagina. Retrieved July 3, 2023, from https://example.com/
Dutch: Janssen, J. (2023, 3 juli). Voorbeeldpagina. Geraadpleegd op 3 juli 2023, van https://example.com/
English: Janssen, J. (2023). Voorbeeldpagina. Retrieved 2023, from https://example.com/
Dutch: Janssen, J. (2023). Voorbeeldpagina. Geraadpleegd op 2023, van https://example.com/
plk commented 1 year ago

Can you get the Dutch localisation from here: https://github.com/plk/biblatex-apa/blob/master/tex/latex/biblatex-apa/lbx/dutch-apa.lbx

and drop it over your existing one (do "kpsewhich dutch-apa.lbx" to find the location) and see if that helps?

LukeSerne commented 1 year ago

Thanks for the quick patch! Unfortunately, it's not quite correct. I'm getting the below output:

Janssen, J. (2023, 3 7). Voorbeeldpagina. Verkregen juli 3, 2023, van https://example.com/

So the issues I see with this are:

  1. The month is shown as an index, not as a name
  2. The "retrieved ... from" date is still in the wrong order (should be in <day> <month> <year> order: 3 juli 2023).

A third issue (which probably should be separate from this issue, is that "Retrieved ..., from" is translated as "Verkregen ..., van" but should really be "Geraadpleegd op ..., van".

plk commented 1 year ago

I feared as much - can you pull the file again and try now?

LukeSerne commented 1 year ago

Thanks! It's almost perfect now. I'm getting:

Janssen, J. (2023, 3 juli). Voorbeeldpagina. Geraadpleegd op 21 april, 2021, van https://example.com/

The only problem is that there is a comma between april and 2021 that should not be there. So it'd be perfect if it looked like:

Janssen, J. (2023, 3 juli). Voorbeeldpagina. Geraadpleegd op 21 april 2021, van https://example.com/
plk commented 1 year ago

Can you try again now?

LukeSerne commented 1 year ago

The extra comma is gone now - thanks!

plk commented 1 year ago

Very good, this will be in the next release.

LukeSerne commented 1 year ago

Doing some more testing, it appears there is a double space between geraadpleegd and op in geraadpleegd op. Adding the below latex code fixes the issue. I think the inclusion of \space along with the literal space is what's causing the issue.

\DefineBibliographyStrings{dutch}{
    retrieved={geraadpleegd op},
}
plk commented 1 year ago

Apologies - late night typo - should be fixed.

LukeSerne commented 11 months ago

Oops, sorry for not responding. It is fixed indeed - thanks!