Skip to content

Conversation

daniel-jettka
Copy link
Contributor

Description, Context and related Issue

This merges some functions which basically do the same thing... get a localized string for the text value of an element.
So these functions were merged into eutil:getLocalizedName($node, $lang) by expanding it a bit:

  • annotation:getLocalizedLabel($node)
  • annotation:generateTitle($anno as element(), $lang as xs:string)
  • annotation:getTitle($anno as element(), $lang as xs:string)
  • annotation:category_getName($category as element(), $language as xs:string)

closes #19

How Has This Been Tested?

Looked for annotations and see if they are rendered correctly.

Types of changes

  • Improvement
  • Refactoring

Overview

  • I have updated the inline documentation accordingly.
  • I have performed a self-review of my code, according to the style guide
  • I have read the CONTRIBUTING document.

@daniel-jettka daniel-jettka linked an issue Sep 18, 2025 that may be closed by this pull request
@peterstadler
Copy link
Member

I totally agree with the refactoring but would only add that having some tests here (for eutil:getLocalizedName) would really be beneficial!

@daniel-jettka
Copy link
Contributor Author

I totally agree with the refactoring but would only add that having some tests here (for eutil:getLocalizedName) would really be beneficial!

Yes, that is true! I added tests for eutil:getLocalizedName and committed to this PR.

@bwbohl
Copy link
Member

bwbohl commented Sep 23, 2025

This will definitely interfere with #83 because I also changed some of these functions

@daniel-jettka daniel-jettka modified the milestones: 1.1.0, 1.2.0 Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

check getAnnotation.xql

3 participants