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 import languages #8

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Conversation

IvanKiral
Copy link
Contributor

Motivation

Which issue does this fix? Fixes #issue number

If no issue exists, what is the fix or new feature? Were there any reasons to fix/implement things that are not obvious?

Checklist

  • Code follows coding conventions held in this repo
  • Automated tests have been added
  • Tests are passing
  • Docs have been updated (if applicable)
  • Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test

If manual testing is required, what are the steps?

@IvanKiral IvanKiral requested review from JiriLojda and a team as code owners December 5, 2023 11:17
Copy link
Member

@JiriLojda JiriLojda left a comment

Choose a reason for hiding this comment

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

Rebase the branch on the #7 and add language ids map into the ImportContext.

src/commands/importExportEntities/entities/languages.ts Outdated Show resolved Hide resolved
src/commands/importExportEntities/entities/languages.ts Outdated Show resolved Hide resolved
src/commands/importExportEntities/entities/languages.ts Outdated Show resolved Hide resolved
src/commands/importExportEntities/entities/languages.ts Outdated Show resolved Hide resolved
src/commands/importExportEntities/entities/languages.ts Outdated Show resolved Hide resolved
@IvanKiral IvanKiral force-pushed the DEVREL-1071/add-languages-import branch from ee41840 to 197ce82 Compare December 7, 2023 10:39
Copy link
Member

@JiriLojda JiriLojda left a comment

Choose a reason for hiding this comment

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

Just a couple of suggestions.

})


const updateProjectLanguage = async (client: ManagementClient, projectLanguage: LanguageModels.LanguageModel, importLanguage: LanguageContracts.ILanguageModelContract) => {
Copy link
Member

Choose a reason for hiding this comment

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

You don't need the async keyword here.

name: importLanguage.name,
codename: importLanguage.codename,
is_active: true,
external_id: importLanguage.external_id ?? `${importLanguage.codename}`.slice(0, 50),
Copy link
Member

Choose a reason for hiding this comment

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

Why do you put codename into the template string, codename is a string on its own. 😄

@JiriLojda JiriLojda merged commit de16c67 into main Dec 7, 2023
1 check passed
@JiriLojda JiriLojda deleted the DEVREL-1071/add-languages-import branch December 7, 2023 13:10
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