Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@enact/i18n
Advanced tools
Enact library for internationalization
@enact/i18n
provides a decorator that can be used to wrap a root component in a React (or Enact) application.
This decorator provides a context to child components that can be used to determine locale text directionality
and to update the current locale. Additionally, it provides a locale-aware Uppercase
Higher Order Component (HOC).
import {I18nDecorator, contextTypes} from `@enact/i18n/I18nDecorator`;
const MyComponent = (props, context) => (
<div>{context.rtl ? "right to left" : "left to right"}</div>
);
// Without contextTypes, your component will not receive context!
MyComponent.contextTypes = contextTypes;
const MyApp = () => (
<div>
<MyComponent />
</div>
);
const MyI18nApp = I18nDecorator(MyApp);
Uppercase
may be used independently of the app decorator. By default, it uppercases the children
property of
the wrapped component, provided it is a string
.
import Uppercase from `@enact/i18n/Uppercase`
const MyComponent = (props) => (
<div {...props} />
);
const MyUppercaseComponent = Uppercase(MyComponent);
Passing preserveCase
in the props to MyUppercaseComponent
will prevent uppercasing.
npm install --save @enact/i18n
This module is built upon the iLib library.
Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
Copyright (c) 2016-2017 LG Electronics
Unless otherwise specified or set forth in the NOTICE file, all content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This work is based on the Apache-2.0 licensed iLib from JEDLsoft.
[1.1.0] - 2017-04-21
Note: We have updated Enact to support React 15.5. This version of React has deprecated accessing PropTypes from the
react
import. Existing apps should update to import from theprop-types
module.enact-dev
has also been updated to the new release.
moonstone/ExpandableInput
property onInputChange
core/util
documentationi18n/Uppercase
prop casing
to control how the component should be uppercasedi18n/util
methods toCapitalized
and toWordCase
to locale-aware uppercase stringsmoonstone/Panels.Panel
prop and moonstone/MoonstoneDecorator
config option: noAutoFocus
to support prevention of setting automatic focus after rendermoonstone/VideoPlayer
props: backwardIcon
, forwardIcon
, jumpBackwardIcon
, jumpForwardIcon
, pauseIcon
, and playIcon
to support icon customization of the playermoonstone/VideoPlayer
props jumpButtonsDisabled
and rateButtonsDisabled
for disabling the pairs of buttons when it's inappropriate for the playing mediamoonstone/VideoPlayer
property playbackRateHash
to support custom playback ratesmoonstone/VideoPlayer
callback prop onControlsAvailable
which fires when the players controls show or hidemoonstone/Image
support for onLoad
and onError
eventsmoonstone/VirtualList.GridListImageItem
prop placeholder
moonstone/Divider
property preserveCase
to display text without capitalizing itspotlight/SpotlightRootDecorator
config option: noAutoFocus
to support prevention of setting automatic focus after renderspotlight/Spotlight
method getSpottableDescendants()
moonstone/Slider
colors and sizing to match the latest designsmoonstone/ProgressBar
to position correctly with other components nearbymoonstone/Panels
breadcrumb to no longer have a horizontal line above itmoonstone/Transition
to measure itself when the CPU is idlemoonstone/Button
colors for transparent and translucent background opacity when disabledmoonstone/ExpandableInput
property onInputChange
to fire along with onChange
. onInputChange
is deprecated and will be removed in a future update.Moonstone.ttf
font to include new iconsmoonstone/Icon
to reference additional iconsspotlight/SpotlightContainerDecorator
to have no default for spotlightRestrict
ui/Slottable
to support slot-candidate tags that have multiple props, which are now forwarded directly instead of just their childrencore/util.childrenEquals
to work with mixed components and textmoonstone/Popup
and moonstone/ContextualPopupDecorator
5-way navigation behaviormoonstone/Input
to not spot its own input decorator on 5-way outmoonstone/VideoPlayer
to no longer render its children
in multiple placesmoonstone/Button
text color when used on a neutral (light) background in some casesmoonstone/Popup
background opacitymoonstone/Marquee
to recalculate properly when its contents changemoonstone/TimePicker
to display time in correct ordermoonstone/Scroller
to prefer spotlight navigation to its internal componentsspotlight/Spotlight
to consider nested containers when adjusting focusui/Cancelable
to run modal handlers in the right orderFAQs
Internationalization support for Enact using iLib
The npm package @enact/i18n receives a total of 23,407 weekly downloads. As such, @enact/i18n popularity was classified as popular.
We found that @enact/i18n demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.