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

Change cultureCode to languageCode #863

Closed
4 tasks done
elsand opened this issue Jun 18, 2024 · 0 comments
Closed
4 tasks done

Change cultureCode to languageCode #863

elsand opened this issue Jun 18, 2024 · 0 comments
Assignees

Comments

@elsand
Copy link
Member

elsand commented Jun 18, 2024

Introduction

Having support for anything but neutral cultures takes us far into YAGNI-land, so we change the name of "cultureCode" to "languageCode" and start normalizing inputs to culture-neutral two/three letter ISO-639 codes.

Description

See discussion on https://altinndevops.slack.com/archives/C06FTKW146B/p1715858314202269?thread_ts=1715770039.305999&cid=C06FTKW146B

We should continue to accept culture specific inputs (en_GB, en_US, en-GB, en-US), but should always normalize this (in the database) as a culture neutral code (ie. en).

This is a breaking change. There should not be made any attempts to convert existing data in the database.

Tasks

Preview Give feedback

Threat modelling

Preview Give feedback

Acceptance criteria

GIVEN a service owner creating a dialog with localization sets
WHEN a localization set contains a culture specifc language code (eg. "en_US" or "en-US")
THEN the code should be normalized to its culture neutral code (eg. "en") and stored as such in the database

@oskogstad oskogstad self-assigned this Jun 20, 2024
oskogstad added a commit that referenced this issue Jul 1, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->
Renames CultureCode to LanguageCode
Still supports culture code as input, but normalizes to neutral language
codes.

## Related Issue(s)

- #863 

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)
@elsand elsand closed this as completed Aug 16, 2024
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

No branches or pull requests

2 participants