Skip to content
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

Terms "collection-number" and "number" are missing #282

Closed
denismaier opened this issue Mar 27, 2023 · 6 comments · Fixed by #298
Closed

Terms "collection-number" and "number" are missing #282

denismaier opened this issue Mar 27, 2023 · 6 comments · Fixed by #298

Comments

@denismaier
Copy link
Member

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?

@adam3smith @bwiernik

@adam3smith
Copy link
Member

No objections; I'd assume this was an oversight

@denismaier
Copy link
Member Author

Ok, I'll add it. Just a question: Do we have a way to add to it all locales where the term is missing? IIRC, @zepinglee had something like this.

@bwiernik
Copy link
Member

I've just done it manually in the past

@zepinglee
Copy link
Contributor

Previously I wrote a script to resolve duplicate terms in all locale files (#269). It was relatively easy so I split each locales-*.xml file into lines and made some modifications. However adding missing terms is not trivial and special care must be taken. First, some terms are missing because they are identical to their default "long" forms. For example, in locales-nn-NO.xml the <term name="no-place" form="short"> is missing and we cannot copy the one from locales-en-US.xml.

<term name="loc-cit">loc. cit.</term> <!-- like ibid., the abbreviated form is the regular form -->
<term name="no-place">manglar stad</term>
<term name="no-publisher">manglar utgjevar</term> <!-- sine nomine -->

<term name="loc-cit">loc. cit.</term> <!-- like ibid., the abbreviated form is the regular form -->
<term name="no-place">no place</term>
<term name="no-place" form="short">n.p.</term>
<term name="no-publisher">no publisher</term> <!-- sine nomine -->

Secondly, in some edge cases the position of copied terms is not as expected. This is similar to git merge which may have conflicts.

I've written a script https://gist.github.com/zepinglee/e6d0076a89b0266c9c9886fd83aacd99 and it should work in most cases.

@bwiernik
Copy link
Member

I open up VS Code, select the line before the one I want to add, then use find-and-replace to replace that line with two lines (the existing one and the new one). I then click on each file in the left sidebard and click the replace all button for each. Takes about 4 minutes to update all the locales.

@bwiernik bwiernik changed the title Term "collection-number" is missing Terms "collection-number" and "number" are missing Feb 12, 2024
@bwiernik
Copy link
Member

I noticed that "number" is also missing. We should double check that all of the number variables are correctly listed.

bwiernik added a commit that referenced this issue Feb 12, 2024
bwiernik added a commit that referenced this issue Feb 13, 2024
* Add missing terms to en-US and alphabetize

Closes #282

* Add missing terms to other locales

* Create add-locale-terms.py

Utility script for copying terms from en-US to other locales

Co-Authored-By: Zeping Lee <[email protected]>

---------

Co-authored-by: Zeping Lee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants