# Bug OP-14317 - Migration fails when default language is pt-BR

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-14317

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 13.3.1 |
| Observed in versions |  |
| Sprint | 13.3.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Install OpenProject 13.2.1
2.  Set default language to `pt-BR` (Brazilian Portuguese)
3.  Update to OpenProject 13.3.0

### What is the buggy behavior?

The migration fails with:

```text
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)

Locale pt-BR is not supported
/app/app/seeders/root_seeder.rb:177:in `desired_lang'
/app/app/seeders/root_seeder.rb:112:in `set_locale!'
/app/app/seeders/root_seeder.rb:50:in `translated_seed_data_for'
/app/db/migrate/20240206173841_fix_untranslated_work_package_roles.rb:10:in `seed_work_package_roles_data'
/app/db/migrate/20240206173841_fix_untranslated_work_package_roles.rb:3:in `up'
```

### What is the expected behavior?

*   the migration should work

### Workaround

1.  From the console, run `sudo openproject console`, and then `Setting.default_language = 'en'` to use English as default language.
2.  Run the migrations with `openproject configure`.
3.  Once it finishes, you can select the correct default language from Administration &gt; Users and Permissions &gt; Users Settings, in Default preferences section.

### Environment information

_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_

**OpenProject installation type**

*   [x] Hosted cloud edition
*   [x] Packaged installation
    *   What distribution?
*   [x] Docker All-in-one container
*   [x] Docker-compose installation
*   [ ] Other (please specify)

**OpenProject version**

_v13.3.0_

**Language**

_Brazilian Portuguese_
