Skip to content

Commit 8bb7c88

Browse files
robonetphyneSpecc
andauthored
Disabled unwanted I18n messages (#1282)
* The unwanted I18n messages from console is disabled * Update docs/CHANGELOG.md Improved Change log Co-authored-by: Peter Savchenko <[email protected]> * Remove import statement import * as _ from '../utils'; removed * Apply suggestions from code review Co-authored-by: Peter Savchenko <[email protected]> Co-authored-by: Peter Savchenko <[email protected]>
1 parent 86dd9b2 commit 8bb7c88

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

dist/editor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- `Improvements` - The `initialBlock` property of Editor config is deprecated. Use the `defaultBlock` instead. [#993](https://github.com/codex-team/editor.js/issues/993)
88
- `Fix` - Fixed the issue of toolbar not disappearing on entering input in Chinese, Hindi and some other languages. [#1196](https://github.com/codex-team/editor.js/issues/1196)
99
- `Improvements` - BlockAPI `call()` method now returns the result of calling method, thus allowing it to expose arbitrary data as needed [#1205](https://github.com/codex-team/editor.js/pull/1205)
10+
- `Improvements` - Unuseful log about missed i18n section has been removed [#1269](https://github.com/codex-team/editor.js/issues/1269)
1011

1112
### 2.18
1213

src/components/core.ts

-2
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,12 @@ export default class Core {
156156

157157
_.setLogLevel(this.config.logLevel);
158158

159-
160159
/**
161160
* If default Block's Tool was not passed, use the Paragraph Tool
162161
*/
163162
_.deprecationAssert(Boolean(this.config.initialBlock), 'config.initialBlock', 'config.defaultBlock');
164163
this.config.defaultBlock = this.config.defaultBlock || this.config.initialBlock || 'paragraph';
165164

166-
167165
/**
168166
* Height of Editor's bottom area that allows to set focus on the last Block
169167
*

src/components/i18n/index.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import defaultDictionary from './locales/en/messages.json';
2-
import * as _ from '../utils';
32
import { I18nDictionary, Dictionary } from '../../../types/configs';
43
import { LeavesDictKeys } from '../../types-internal/i18n-internal-namespace';
54

@@ -60,9 +59,12 @@ export default class I18n {
6059
private static _t(namespace: string, dictKey: string): string {
6160
const section = I18n.getNamespace(namespace);
6261

63-
if (section === undefined) {
64-
_.logLabeled('I18n: section %o was not found in current dictionary', 'log', namespace);
65-
}
62+
/**
63+
* For Console Message to Check Section is defined or not
64+
* if (section === undefined) {
65+
* _.logLabeled('I18n: section %o was not found in current dictionary', 'log', namespace);
66+
* }
67+
*/
6668

6769
if (!section || !section[dictKey]) {
6870
return dictKey;

0 commit comments

Comments
 (0)