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

chore(developer): kmcmplib and kmc-kmn/kmw have shared errors with different strings #10866

Closed
mcdurdin opened this issue Feb 27, 2024 · 0 comments · Fixed by #12059
Closed
Assignees
Milestone

Comments

@mcdurdin
Copy link
Member

mcdurdin commented Feb 27, 2024

There are two shared errors between kmcmplib and kmw compiler which have different message strings. These should be consolidated, or split into separate errors:

  // kmcmplib: static Error_InvalidBegin                                  = () => m(this.ERROR_InvalidBegin, `Invalid 'begin' command`);
  static Error_InvalidBegin = () => m(this.ERROR_InvalidBegin,
    `A "begin unicode" statement is required to compile a KeymanWeb keyboard`);
  static ERROR_InvalidBegin                                   = SevError | 0x00B;

  // kmcmplib: static Warn_DontMixChiralAndNonChiralModifiers              = () => m(this.WARN_DontMixChiralAndNonChiralModifiers, `Don't mix the use of left/right modifiers with non-left/right modifiers in the same platform`);
  static Warn_DontMixChiralAndNonChiralModifiers = () => m(this.WARN_DontMixChiralAndNonChiralModifiers,
    `This keyboard contains Ctrl,Alt and LCtrl,LAlt,RCtrl,RAlt sets of modifiers. Use only one or the other set for web target.`);
  static WARN_DontMixChiralAndNonChiralModifiers              = SevWarn | 0x0A3;

Came out of #10867 work

Ideally, move the kmcmplib error messages themselves out of kmcmplib and into kmc-kmn.

@mcdurdin mcdurdin added this to the 18.0 milestone Feb 29, 2024
@mcdurdin mcdurdin modified the milestones: 18.0, A18S5 Apr 29, 2024
@mcdurdin mcdurdin self-assigned this Apr 29, 2024
@mcdurdin mcdurdin modified the milestones: A18S5, A18S7 Jul 5, 2024
mcdurdin added a commit that referenced this issue Jul 30, 2024
* Remove compiler message definitions from kmcmplib
* Add parameterization to compiler message structures
* Translate parameters for existing parameterized messages (except for
  `ERROR_InvalidToken`, which requires a bigger refactor of
  `GetXStringImpl()` and many friends)
* Add columnNumber to message structures (not yet used in kmc-kmn)
* Add filename to message structures (not yet used in kmcmplib)
* Rename `INFO_Info` to `INFO_MinimumCoreEngineVersion` and
  `INFO_MinimumEngineVersion` to `INFO_MinimumWebEngineVersion`

Relates-to: #10866
@darcywong00 darcywong00 modified the milestones: A18S7, A18S8 Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants