Files
it-tools/src/tools/sharepoint-decoder/sharepoint-decoder.service.ts
T
sharevb a8c6ebc81b Feat/translate all content (#121)
* 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
2025-07-20 21:01:01 +02:00

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')}`;
}