shoelace/src/utilities/localize.ts

37 wiersze
1.3 KiB
TypeScript
Czysty Zwykły widok Historia

2022-06-10 20:37:10 +00:00
import { LocalizeController as DefaultLocalizationController } from '@shoelace-style/localize';
import '../translations/en'; // Register English as the default/fallback language
import type { Translation as DefaultTranslation } from '@shoelace-style/localize';
// Extend the controller and apply our own translation interface for better typings
export class LocalizeController extends DefaultLocalizationController<Translation> {}
2021-12-06 15:57:54 +00:00
// Export functions from the localize lib so we have one central place to import them from
2022-06-10 20:37:10 +00:00
export { registerTranslation } from '@shoelace-style/localize';
export interface Translation extends DefaultTranslation {
$code: string; // e.g. en, en-GB
$name: string; // e.g. English, Español
$dir: 'ltr' | 'rtl';
clearEntry: string;
close: string;
copy: string;
2022-12-28 16:42:08 +00:00
numOptionsSelected: (num: number) => string;
2022-06-10 20:37:10 +00:00
currentValue: string;
hidePassword: string;
2022-08-10 20:52:39 +00:00
loading: string;
2022-06-10 20:37:10 +00:00
progress: string;
remove: string;
resize: string;
scrollToEnd: string;
scrollToStart: string;
selectAColorFromTheScreen: string;
showPassword: string;
toggleColorFormat: string;
feat: add carousel component feat: add nav indicators wip wip wip fix: minor fixes fix: minor fixes fix: some refactor chore: update docs chore: update docs fix: remove slide component feat: create sl-carousel-item feat: code refactoring and improvements chore: update docs with more examples chore: fix docs feat: add autoplay feat: implement accessibility fix: change icons for rtl chore: minor change feat: improve accessibility fix: minor regression fix: minor regression chore: fix docs fix: improve accessibility and minor fixes fix: remove heading and refactor component chore: add custom style exmaple fix: address review commnets * Removed header from carousel * Added `ArrowUp` and `ArrowDown` in keyboard navigation * Added `--scroll-hint-margin` css property * Added an example with customized carousel layout * Fixed thumbnails navigation in demo * Renamed show-controls to show-arrows and updated the corresponding parts/css accordingly * Changed `activeSlideElement` getter to a private method * Changed pagination colors * Added `--slide-width` and `--slide-height` css properties chore: update docs fix: integrate latest repo changes fix: add aspect ratio and rebase chore: remove ignore path feat: multiple slides per page feat: multiple slide per page fix: various improvements chore: minor changes chore: minor changes chore: add bit of documentation chore: improve documentation fix: add unit tests and fix minor issues chore: update documentation and unit tests chore: update tests
2022-08-06 08:45:45 +00:00
// TODO: upate translations for all languages
goToCarouselNextSlide?: string;
goToCarouselPreviousSlide?: string;
goToCarouselSlide?: (slide: number, count: number) => string;
2022-06-10 20:37:10 +00:00
}