mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-28 08:14:59 +03:00
* feat: add script to extract strings * feat: extract many strings (html, attr, label) * feat(extract string): extract html only for .vue and single file mode * fix: __i18n_ally_root__ * feat: nestify en.yml + extract tab attributes * feat: add script to extract strings * feat: extract many strings (html, attr, label) * feat(extract string): extract html only for .vue and single file mode * fix: __i18n_ally_root__ * feat: nestify en.yml + extract tab attributes * fix: lint * feat: add vue-i18n-extract to check missing keys * fix: unit tests * fix: update vue i18n plugin
11 lines
381 B
TypeScript
11 lines
381 B
TypeScript
import { translate as t } from '@/plugins/i18n.plugin';
|
|
|
|
export function decodeSharePointsURL(sharePointsUrl: string) {
|
|
if (!sharePointsUrl.match(/\.sharepoint\.com/)) {
|
|
throw new Error(t('tools.sharepoint-decoder.text.invalid-sharepoint-url-provided'));
|
|
}
|
|
|
|
const url = new URL(sharePointsUrl);
|
|
return `${url.protocol}//${url.hostname}${url.searchParams.get('id')}`;
|
|
}
|