Skip to content

Commit

Permalink
Add localizations
Browse files Browse the repository at this point in the history
  • Loading branch information
saviit committed Aug 21, 2024
1 parent 7badb64 commit b955728
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 17 deletions.
40 changes: 40 additions & 0 deletions timApp/i18n/messages.fi.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -9048,6 +9048,46 @@
<context context-type="linenumber">307</context>
</context-group>
</trans-unit>
<trans-unit id="4343307932975048814" datatype="html">
<source>Item is visible publicly (ie. to everyone), including anonymous users.</source>
<target state="translated">Kohde näkyy julkisesti kaikille (myös anonyymeille käyttäjille).</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">23,21</context>
</context-group>
</trans-unit>
<trans-unit id="53962414988403367" datatype="html">
<source>Item is visible to logged-in users.</source>
<target state="translated">Kohde näkyy sisäänkirjautuneille käyttäjille.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">24,21</context>
</context-group>
</trans-unit>
<trans-unit id="6175417143135898708" datatype="html">
<source>Item is visible to groups belonging to a Haka organization.</source>
<target state="translated">Kohde näkyy Haka-organisaatioon kuuluville ryhmille.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">25,21</context>
</context-group>
</trans-unit>
<trans-unit id="5605266308588695513" datatype="html">
<source>Item is visible only to specific users, check the Manage-page for details.</source>
<target state="translated">Kohde näkyy vain valituille käyttäjille, katso lisätiedot Hallitse-sivulta.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">26,21</context>
</context-group>
</trans-unit>
<trans-unit id="514896344625162208" datatype="html">
<source>Item is visible only to its owners.</source>
<target state="translated">Kohde näkyy vain omistajilleen.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>
44 changes: 42 additions & 2 deletions timApp/i18n/messages.sv.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -8911,8 +8911,8 @@
</context-group>
</trans-unit>
<trans-unit id="1805269398693443899" datatype="html">
<source>Error: <x id="START_TAG_SPAN" ctype="x-span" equiv-text="&lt;span [innerHTML]=&quot;error | purify&quot;&gt;"/><x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span&gt;"/></source>
<target state="new">Error: <x id="START_TAG_SPAN" ctype="x-span" equiv-text="&lt;span [innerHTML]=&quot;error | purify&quot;&gt;"/><x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span&gt;"/></target>
<source>Error: <x id="START_TAG_SPAN" ctype="x-span" equiv-text="&lt;span [innerHTML]=&quot;error | purify&quot;>"/><x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span>"/></source>
<target state="new">Error: <x id="START_TAG_SPAN" ctype="x-span" equiv-text="&lt;span [innerHTML]=&quot;error | purify&quot;>"/><x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span>"/></target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/ui/error-description.component.ts</context>
<context context-type="linenumber">20</context>
Expand Down Expand Up @@ -8950,6 +8950,46 @@
<context context-type="linenumber">307</context>
</context-group>
</trans-unit>
<trans-unit id="4343307932975048814" datatype="html">
<source>Item is visible publicly (ie. to everyone), including anonymous users.</source>
<target state="translated">Objektet är synligt offentligt (dvs. för alla), inklusive anonyma användare.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">23,21</context>
</context-group>
</trans-unit>
<trans-unit id="53962414988403367" datatype="html">
<source>Item is visible to logged-in users.</source>
<target state="translated">Objektet är synligt för inloggade användare.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">24,21</context>
</context-group>
</trans-unit>
<trans-unit id="6175417143135898708" datatype="html">
<source>Item is visible to groups belonging to a Haka organization.</source>
<target state="translated">Objektet är synligt för grupper som tillhör en Haka-organisation.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">25,21</context>
</context-group>
</trans-unit>
<trans-unit id="5605266308588695513" datatype="html">
<source>Item is visible only to specific users, check the Manage-page for details.</source>
<target state="translated">Objektet är endast synligt för vissa användare, se sidan Hantera för mer information.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">26,21</context>
</context-group>
</trans-unit>
<trans-unit id="514896344625162208" datatype="html">
<source>Item is visible only to its owners.</source>
<target state="translated">Objektet är endast synligt för dess ägare.</target>
<context-group purpose="location">
<context context-type="sourcefile">static/scripts/tim/folder/directory-list.component.ts</context>
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>
20 changes: 5 additions & 15 deletions timApp/static/scripts/tim/folder/directory-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,11 @@ enum AccessLevelBadge {

const AccessLevelBadgeInfo: Record<AccessLevelBadge, string> = {
[AccessLevelBadge.NO_BADGE]: "",
[AccessLevelBadge.PUBLIC]:
"Item is visible publicly (ie. to everyone), including anonymous users.",
[AccessLevelBadge.LOGGED_IN]: "Item is visible to logged-in users.",
[AccessLevelBadge.ORGANIZATION]:
"Item is visible to groups belonging to a Haka organization.",
[AccessLevelBadge.LIMITED]:
"Item is visible only to specific users, check the Manage-page for details.",
[AccessLevelBadge.PRIVATE]: "Item is visible only to its owners.",

// TODO: Turn on localize when working
// [AccessLevelBadge.PUBLIC]: $localize`"Item is visible publicly (ie. to everyone), including anonymous users.`,
// [AccessLevelBadge.LOGGED_IN]: $localize`"Item is visible to logged-in users.`,
// [AccessLevelBadge.ORGANIZATION]: $localize`"Item is visible to groups belonging to a Haka organization.`,
// [AccessLevelBadge.LIMITED]: $localize`"Item is visible only to specific users, check the Manage-page for details.`,
// [AccessLevelBadge.PRIVATE]: $localize`"Item is visible only to its owners.`,
[AccessLevelBadge.PUBLIC]: $localize`Item is visible publicly (ie. to everyone), including anonymous users.`,
[AccessLevelBadge.LOGGED_IN]: $localize`Item is visible to logged-in users.`,
[AccessLevelBadge.ORGANIZATION]: $localize`Item is visible to groups belonging to a Haka organization.`,
[AccessLevelBadge.LIMITED]: $localize`Item is visible only to specific users, check the Manage-page for details.`,
[AccessLevelBadge.PRIVATE]: $localize`Item is visible only to its owners.`,
};

@Component({
Expand Down

0 comments on commit b955728

Please sign in to comment.