-
Notifications
You must be signed in to change notification settings - Fork 3
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
1843: Missing application labels #1855
base: main
Are you sure you want to change the base?
Conversation
…ByMinisterPresidentEntitlement, consider parents for resolving keys for attachments, fix wrong label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The architecture of these translations keys seems quite fragile to me...
I haven't checked if you caught every translation key. I also did not test anything.
"juleicaNumber": "Kartennummer", | ||
"juleicaExpiration": "Karte gültig bis", | ||
"copyOfJuleicaFront": "Kopie der Karte (1)", | ||
"copyOfJuleicaBack": "Kopie der Karte (2)", | ||
"blueCardWorkAtOrganizationsEntitlement": "Ich engagiere mich ehrenamtlich seit mindestens zwei Jahren freiwillig mindestens fünf Stunden pro Woche oder bei Projektarbeiten mindestens 250 Stunden jährlich", | ||
"goldenCardWorkAtOrganizationsEntitlement": "Ich bin seit mindestens 25 Jahren mindestens 5 Stunden pro Woche oder 250 Stunden pro Jahr bei einem Verein oder einer Organisation ehrenamtlich tätig", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also unsure why these strings are duplicated (once here and once in goldenCardEntitlementType.WorkAtOrganizations)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that the keys were stored like that in the database (example)
I believe this happens in the GoldenCardEntitlement.kt
If i change this structure i would also have to replace the keys in jsonField in the production database via migration or sth :/
{
"name": "goldenCardHonoredByMinisterPresidentEntitlement",
"type": "Array",
"value": [
{
"name": "certificate",
"type": "Attachment",
"value": {
"fileIndex": 0
}
}
]
},
i don't see any other way now to resolve the other structure.
If you have any idea let me known @michael-markl
But i May delete some duplicates if I change the keys in the form that write it in the form state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Okay i adjusted the keys that were used for the state (these keys will also be stored like that in the database, so we can properly resolve it again)
Removed the duplicates in the de.json
…keys as they were stored in the database
fa961e2
to
55f5d48
Compare
@seluianova and @bahaaTuffaha this pr needs really proper testing, since we will have bad issues with wrong i18n keys in the database, if there is a mess. If you have any questions don't hesitate to ask me |
].includes(jsonField.name) | ||
? `${jsonField.name}.title` | ||
: jsonField.name | ||
|
||
const children = jsonField.value.map((jsonFieldIt, index: number) => ( | ||
<JsonFieldView | ||
jsonField={jsonFieldIt} | ||
parentName={['organizationContact', 'organization'].includes(jsonField.name) ? jsonField.name : undefined} | ||
parentName={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since these keys are objects we need also the parent to resolve them properly
Short description
Some application labels were not resolved properly
Proposed changes
goldenCardHonoredByMinisterPresidentEntitlement
,Side effects
Testing
de.json
, there were some keys likecertificate
resolved wrong because the parents wasn't usedResolved issues
Fixes: #1843
Fixes: #1852