@brightspace-ui/core 3.344.0 → 3.344.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,7 @@ class BackdropStaleOverlay extends LocalizeCoreElement(LitElement) {
35
35
 
36
36
  render() {
37
37
  const message = this.text || this.localize('components.backdrop-stale-overlay.message');
38
- const buttonText = this.buttonText || this.localize('intl-common:actions:reload');;
38
+ const buttonText = this.buttonText || this.localizeCommon('actions:reload');;
39
39
 
40
40
  return html`
41
41
  <p class="d2l-body-compact">${message}</p>
@@ -34,7 +34,7 @@ class ButtonCopy extends FocusMixin(ButtonCopyMixin(LitElement)) {
34
34
  <d2l-button-icon
35
35
  ?disabled="${this.disabled}"
36
36
  icon="${this._recentCopySuccessful ? 'tier1:check' : 'tier1:copy'}"
37
- text="${this.text ?? this.localize('intl-common:actions:copy')}"
37
+ text="${this.text ?? this.localizeCommon('actions:copy')}"
38
38
  @click="${this._handleClick}">
39
39
  </d2l-button-icon>
40
40
  ${this._renderToast()}
@@ -154,7 +154,7 @@ this.localizeHTML('octopus', {
154
154
 
155
155
  ### Common Resources
156
156
 
157
- Some resources are common and shared across D2L applications. To use these, set the `loadCommon` option:
157
+ Some localization resources are common and shared across D2L applications. To use these resources, set the `loadCommon` option:
158
158
 
159
159
  ```javascript
160
160
  static get localizeConfig() {
@@ -164,11 +164,21 @@ static get localizeConfig() {
164
164
  }
165
165
  ```
166
166
 
167
+ #### localizeCommon
168
+
169
+ The localized value of [these common terms](https://github.com/BrightspaceUI/intl/blob/main/lang/en.js) can be accessed using `localizeCommon(name)`, where `intl-common:` is omitted from the term name.
170
+
171
+ Example:
172
+
173
+ ```javascript
174
+ const value = localizer.localizeCommon('actions:copy'); // -> Copy in en-US
175
+ ```
176
+
167
177
  #### localizeCharacter
168
178
 
169
179
  The localized value of the following characters can be accessed using `localizeCharacter(char)`:
170
- * `'` (apostrophe)
171
180
  * `&` (ampersand)
181
+ * `'` (apostrophe)
172
182
  * `*` (asterisk)
173
183
  * `\` (backslash)
174
184
  * `:` (colon)
@@ -182,7 +192,7 @@ The localized value of the following characters can be accessed using `localizeC
182
192
  * `"` (quotation mark)
183
193
 
184
194
  ```javascript
185
- this.localizeCharacter('&'); // -> 'ampersand' in en-US
195
+ const value = this.localizeCharacter('&'); // -> 'ampersand' in en-US
186
196
  ```
187
197
 
188
198
  ## Off-Stack Language Overrides
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.344.0",
3
+ "version": "3.344.1",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",