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

language with factory #260

Merged
merged 3 commits into from
Mar 19, 2020
Merged

language with factory #260

merged 3 commits into from
Mar 19, 2020

Conversation

izulin
Copy link
Collaborator

@izulin izulin commented Mar 19, 2020

Context

Creating engine from single array under different language should result in different naming.

How has this been tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature or improvement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Additional language file or change to the existing one (translations)

Related issue(s):

  1. The name for a new Sheet1 is hardcoded in buildFromSheet method #254

Checklist:

  • My code follows the code style of this project,
  • My change requires a change to the documentation,
  • I described the modification in the CHANGELOG.md file.

src/BuildEngineFromArraysFactory.ts Outdated Show resolved Hide resolved
@@ -66,6 +66,9 @@ export class BuildEngineFromArraysFactory {
}

public buildFromSheet(sheet: Sheet, configInput?: Partial<ConfigParams>): HyperFormula {
return this.buildFromSheets({Sheet1: sheet}, configInput)
const newsheetprefix = new Config(configInput).language.interface.NEW_SHEET_PREFIX + '1'
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm 🤔 We're digging deep. Maybe within #36 we could introduce a method getTranslation('interface.NEW_SHEET_PREFIX') to be sure the getter is unit tested correctly and we have fallbacks in place.

Right now I see here possible three null exceptions

izulin and others added 2 commits March 19, 2020 15:52
Co-Authored-By: Wojciech Czerniak <wojciech.czerniak@gmail.com>
@izulin izulin merged commit 457a501 into develop Mar 19, 2020
@izulin izulin mentioned this pull request Mar 19, 2020
5 tasks
@izulin izulin deleted the pu/issue-254 branch March 24, 2020 14:50
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