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

Add translation support #11

Merged
merged 10 commits into from
Nov 19, 2024
Merged

Add translation support #11

merged 10 commits into from
Nov 19, 2024

Conversation

patrickackermann
Copy link
Contributor

No description provided.

@@ -22,8 +22,7 @@
/**
* A reader for LKMap INTERLIS transfer files.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PP: Kommentar anpassen

}
if (!(viewable instanceof Table classDef)) {
throw new IllegalArgumentException("Viewable is not an AbstractClassDef for object with id \"" + objectClass + "\".");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PP: Die Variable viewable kann sich auf ein beliebiges Element (nicht nur Viewables) beziehen. Ich würde es z.B. element nennen und die Exception Messages auch entsprechend anpassen.

System.out.println("No viewable found for object with id \"" + iomObject.getobjectoid() + "\".");
return Optional.empty();
}
if (!(viewable instanceof AbstractClassDef<?> classDef)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PP: gleich wie oben, Variable viewable

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Was hältst du davon, z.B. die Methoden für Translations in eine Helper-Klasse auszulagern?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Einfach so auslagern liessen sich nur getTranslatedAttributeOrRole und getTranslatedEnumValue.
getTranslatedPath hätte ich dann auch gerne ausgelagert aber das braucht noch den record PathElement.
Darum tendiere ich eher zu drinlassen.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dann lassen wir es wie besprochen in der ObjectMapper Klasse.

@patrickackermann patrickackermann merged commit 5ed5f17 into main Nov 19, 2024
1 check passed
@patrickackermann patrickackermann deleted the add-translation-support branch November 19, 2024 13:54
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 this pull request may close these issues.

2 participants