#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Lang {
En,
De,
}
pub struct Text {
pub person: &'static str,
pub given_name: &'static str,
pub family_name: &'static str,
pub additional_names: &'static str,
pub websites: &'static str,
pub country: &'static str,
pub affiliations: &'static str,
pub started: &'static str,
pub ended: &'static str,
pub filters: &'static str,
pub facet_year: &'static str,
pub facet_type: &'static str,
pub facet_language: &'static str,
pub facet_license: &'static str,
pub open_all: &'static str,
pub close_all: &'static str,
pub clear_filters: &'static str,
pub search: &'static str,
pub search_placeholder: &'static str,
pub copy_citation: &'static str,
pub content: &'static str,
pub full_text_pdf: &'static str,
pub published: &'static str,
pub in_container: &'static str,
pub license: &'static str,
pub no_results: &'static str,
pub no_works: &'static str,
pub pagination: &'static str,
pub previous_page: &'static str,
pub next_page: &'static str,
pub language: &'static str,
pub apply: &'static str,
pub featured_only: &'static str,
pub clear: &'static str,
pub export_format: &'static str,
pub citation_style: &'static str,
pub formatted_citation: &'static str,
pub export: &'static str,
pub copy: &'static str,
pub copied: &'static str,
}
const EN: Text = Text {
person: "Person",
given_name: "Given name",
family_name: "Family name",
additional_names: "Also known as",
websites: "Websites & social links",
country: "Country",
affiliations: "Affiliations",
started: "Started",
ended: "Ended at",
filters: "Filters",
facet_year: "Publication year",
facet_type: "Content type",
facet_language: "Language",
facet_license: "License",
open_all: "Open all",
close_all: "Close all",
clear_filters: "Clear filters",
search: "Search",
search_placeholder: "Search these works",
copy_citation: "Copy citation",
content: "Content",
full_text_pdf: "Full Text PDF",
published: "published",
in_container: "in",
license: "Distributed under the terms of the",
no_results: "No results found.",
no_works: "No works on this page.",
pagination: "Pagination",
previous_page: "Previous page",
next_page: "Next page",
language: "Language",
apply: "Apply",
featured_only: "Featured only",
clear: "Clear",
export_format: "Export format",
citation_style: "Citation style",
formatted_citation: "Formatted Citation",
export: "Export",
copy: "Copy",
copied: "Copied",
};
const DE: Text = Text {
person: "Person",
given_name: "Vorname",
family_name: "Familienname",
additional_names: "Auch bekannt als",
websites: "Webseiten & soziale Netzwerke",
country: "Land",
affiliations: "Zugehörigkeiten",
started: "Beginn",
ended: "Ende",
filters: "Filter",
facet_year: "Erscheinungsjahr",
facet_type: "Inhaltstyp",
facet_language: "Sprache",
facet_license: "Lizenz",
open_all: "Alle öffnen",
close_all: "Alle schließen",
clear_filters: "Filter zurücksetzen",
search: "Suche",
search_placeholder: "Diese Werke durchsuchen",
copy_citation: "Zitat kopieren",
content: "Inhalt",
full_text_pdf: "Volltext-PDF",
published: "veröffentlicht",
in_container: "in",
license: "Veröffentlicht unter den Bedingungen der",
no_results: "Keine Ergebnisse gefunden.",
no_works: "Keine Werke auf dieser Seite.",
pagination: "Seitennummerierung",
previous_page: "Vorherige Seite",
next_page: "Nächste Seite",
language: "Sprache",
apply: "Anwenden",
featured_only: "Nur hervorgehobene",
clear: "Löschen",
export_format: "Exportformat",
citation_style: "Zitierstil",
formatted_citation: "Formatiertes Zitat",
export: "Exportieren",
copy: "Kopieren",
copied: "Kopiert",
};
pub struct Pages {
pub library: &'static str,
pub library_version: &'static str,
pub user: &'static str,
pub items: &'static str,
pub attachments: &'static str,
pub notes: &'static str,
pub collections: &'static str,
pub tags: &'static str,
pub in_trash: &'static str,
pub files: &'static str,
pub stored: &'static str,
pub attachment_storage: &'static str,
pub backups: &'static str,
pub backup_last: &'static str,
pub backup_never: &'static str,
pub backup_off: &'static str,
pub backup_failed: &'static str,
pub backup_warning: &'static str,
pub signed_downloads: &'static str,
pub streamed_downloads: &'static str,
pub files_up_to: &'static str,
pub are_accepted: &'static str,
pub public_profile: &'static str,
pub profile_hidden: &'static str,
pub profile_visible: &'static str,
pub it_lists: &'static str,
pub all_of_my_publications: &'static str,
pub show_profile: &'static str,
pub hide_profile: &'static str,
pub connect_zotero: &'static str,
pub connect_intro: &'static str,
pub connect_download: &'static str,
pub connect_install: &'static str,
pub connect_server: &'static str,
pub connect_login: &'static str,
pub sync_heading: &'static str,
pub sync_intro: &'static str,
pub sync_metadata: &'static str,
pub sync_publications: &'static str,
pub sync_needs_orcid: &'static str,
pub sync_log: &'static str,
pub sync_preview: &'static str,
pub sync_now: &'static str,
pub sync_running: &'static str,
pub sync_busy: &'static str,
pub sync_never: &'static str,
pub sync_last: &'static str,
pub sync_last_preview: &'static str,
pub sync_details: &'static str,
pub sync_more: &'static str,
pub sync_ok: &'static str,
pub sync_partial: &'static str,
pub sync_failed: &'static str,
pub sync_aborted: &'static str,
pub sync_off: &'static str,
pub sync_on_metadata: &'static str,
pub sync_on_publications: &'static str,
pub sync_opted_in: &'static str,
pub sync_newest: &'static str,
pub sync_last_failed: &'static str,
pub sign_in: &'static str,
pub api_key: &'static str,
pub key_holders: &'static str,
pub needs_signing_in: &'static str,
pub sign_in_with: &'static str,
pub sign_in_with_end: &'static str,
pub approve_with_end: &'static str,
pub from_another_site: &'static str,
pub not_a_key: &'static str,
pub sign_in_failed: &'static str,
pub no_orcid: &'static str,
pub not_allowed: &'static str,
pub ask_admin_email: &'static str,
pub ask_admin: &'static str,
pub connect_account: &'static str,
pub connect_why: &'static str,
pub connect_how: &'static str,
pub connect_key_page: &'static str,
pub connect_kept: &'static str,
pub zotero_key: &'static str,
pub connect: &'static str,
pub zotero_key_rejected: &'static str,
pub zotero_unreachable: &'static str,
pub zotero_id_taken: &'static str,
pub account_expired: &'static str,
pub signing_out: &'static str,
pub signed_out_here: &'static str,
pub continue_signing_out: &'static str,
pub authorize_zotero: &'static str,
pub authorized: &'static str,
pub login_expired: &'static str,
pub no_login_request: &'static str,
pub not_authorized: &'static str,
pub pending_signed_in: &'static str,
pub pending_sign_in: &'static str,
pub pending_key: &'static str,
pub return_to_zotero: &'static str,
pub expired_message: &'static str,
pub missing_message: &'static str,
pub approve: &'static str,
pub approval_from_another_site: &'static str,
pub not_allowed_to_approve: &'static str,
pub signed_in_as: &'static str,
pub storage_used: &'static str,
pub of: &'static str,
pub no_limit: &'static str,
pub over_quota: &'static str,
pub devices: &'static str,
pub devices_intro: &'static str,
pub no_devices: &'static str,
pub revoke: &'static str,
pub added: &'static str,
pub last_used: &'static str,
pub never_used: &'static str,
pub admin: &'static str,
pub invites: &'static str,
pub invites_intro: &'static str,
pub no_invites: &'static str,
pub invites_off: &'static str,
pub access_claim: &'static str,
pub access_users: &'static str,
pub access_admins: &'static str,
pub disabled_by_provider: &'static str,
pub orcid_id: &'static str,
pub note: &'static str,
pub invite: &'static str,
pub uninvite: &'static str,
pub invite_used: &'static str,
pub not_an_orcid: &'static str,
pub already_a_user: &'static str,
pub not_a_quota: &'static str,
pub users: &'static str,
pub quota_mb: &'static str,
pub default_quota_is: &'static str,
pub empty_for_no_limit: &'static str,
pub save: &'static str,
pub disable: &'static str,
pub enable: &'static str,
pub disabled: &'static str,
pub owner: &'static str,
pub you: &'static str,
pub devices_count: &'static str,
pub groups: &'static str,
pub groups_intro: &'static str,
pub no_groups: &'static str,
pub your_groups: &'static str,
pub all_groups: &'static str,
pub search_groups: &'static str,
pub search_groups_placeholder: &'static str,
pub search_groups_hint: &'static str,
pub search_on_zotero: &'static str,
pub no_groups_match: &'static str,
pub create_group: &'static str,
pub groups_managed: &'static str,
pub group_profile: &'static str,
pub group_members: &'static str,
pub group_library: &'static str,
pub manage_profile: &'static str,
pub manage_members: &'static str,
pub manage_library: &'static str,
pub view_on_zotero: &'static str,
pub group_type: &'static str,
pub type_private: &'static str,
pub type_public_closed: &'static str,
pub type_public_open: &'static str,
pub group_website: &'static str,
pub library_reading: &'static str,
pub library_editing: &'static str,
pub file_editing: &'static str,
pub anyone: &'static str,
pub any_member: &'static str,
pub only_admins: &'static str,
pub no_one: &'static str,
pub not_on_defter: &'static str,
pub members_here_only: &'static str,
pub role_owner: &'static str,
pub role_admin: &'static str,
pub role_member: &'static str,
pub home: &'static str,
pub public_profiles: &'static str,
pub search_profiles: &'static str,
pub search_button: &'static str,
pub no_profiles: &'static str,
pub no_profiles_match: &'static str,
pub page_word: &'static str,
pub person_one: &'static str,
pub people: &'static str,
pub sign_in_to_approve: &'static str,
pub key_only_reads: &'static str,
}
const PAGES_EN: Pages = Pages {
library: "Library",
library_version: "Library version",
user: "user",
items: "Items",
attachments: "Attachments",
notes: "Notes",
collections: "Collections",
tags: "Tags",
in_trash: "In trash",
files: "Files",
stored: "Stored",
attachment_storage: "Attachment storage",
backups: "Backups",
backup_last: "Last backup:",
backup_never: "No backup has run since the server started.",
backup_off: "Scheduled backups are off.",
backup_failed: "The last backup failed:",
backup_warning: "With a warning:",
signed_downloads: "Clients download files directly from the bucket through pre-signed URLs.",
streamed_downloads: "Downloads are streamed through this server.",
files_up_to: "Files up to",
are_accepted: "are accepted.",
public_profile: "Public profile",
profile_hidden: "Hidden: the address answers \"not found\".",
profile_visible: "Visible to anyone.",
it_lists: "It lists",
all_of_my_publications: ": everything in My Publications in Zotero.",
show_profile: "Show profile",
hide_profile: "Hide profile",
connect_zotero: "Connect Zotero",
connect_intro: "defter works beside zotero.org: Zotero keeps syncing with zotero.org and \
Zotero Storage, and the defter for Zotero plugin also syncs your library \
with this server. Requires Zotero 10.",
connect_download: "Download",
connect_install: " and install it in Zotero under Tools → Plugins → gear menu → Install \
Plugin From File…",
connect_server: "In Zotero, open Settings → Defter and select this server:",
connect_login: "Click Log in, approve the login on this server, then Sync with Defter now.",
sync_heading: "commonmeta",
sync_intro: "Once a day, commonmeta does what you choose here, each on its own. It \
adds the works in your ORCID record to My Publications: an item holding \
one is put in, a work your library lacks is created there. And it updates \
the metadata of the works in your library with a DOI from its store of \
Crossref and DataCite records: it fills in what an item lacks — title, \
journal, publication date, authors, language, license and more — and \
attaches a PDF it knows to an item without one. A field you filled in is \
kept: where an item says otherwise, or has another type than its work \
calls for, commonmeta adds a duplicate with its metadata, once for each \
version of its record, which Zotero offers to merge under Duplicate \
Items. Zotero picks the changes up on its next sync. At most 1,000 items \
change a day; the rest follow.",
sync_metadata: "Update the works metadata in my Zotero library",
sync_publications: "Add the works in my ORCID record to My Publications",
sync_needs_orcid: "Needs an ORCID iD on your account.",
sync_log: "Download the changes as JSON",
sync_preview: "Preview changes",
sync_now: "Sync now",
sync_running: "A sync of your library is running.",
sync_busy: "Another sync is running; try again in a few minutes.",
sync_never: "Your library has not been synced yet.",
sync_last: "Last sync:",
sync_last_preview: "Last preview:",
sync_details: "Changes",
sync_more: "more not shown",
sync_ok: "done",
sync_partial: "done, with problems",
sync_failed: "failed",
sync_aborted: "stopped, as sync was turned off; changes listed below were made before",
sync_off: "off",
sync_on_metadata: "metadata",
sync_on_publications: "My Publications",
sync_opted_in: "users sync their library with commonmeta",
sync_newest: "newest sync",
sync_last_failed: "last sync failed",
sign_in: "Sign in",
api_key: "API key",
key_holders: "This server's library status and settings are shown to holders of one of its \
API keys.",
needs_signing_in: "This server's library status and settings need signing in.",
sign_in_with: "Sign in with",
sign_in_with_end: "",
approve_with_end: "to approve",
from_another_site: "The sign-in was sent from another site.",
not_a_key: "That is not an API key of this library.",
sign_in_failed: "Signing in did not work. Please try again.",
no_orcid: "This account has no ORCID iD, which signing in here needs.",
not_allowed: "This account is not allowed into this library.",
ask_admin_email: "To use defter, ask to be added — write to",
ask_admin: "To use defter, ask the admins of this server to add you, or your \
institution's IT.",
connect_account: "Connect your zotero.org account",
connect_why: "Your user ID here is your zotero.org user ID, so that your Zotero can sync \
the same library with zotero.org and with defter.",
connect_how: "Create a key on zotero.org; read-only access is enough. Paste it here:",
connect_key_page: "zotero.org → Settings → Security → Create new private key",
connect_kept: "defter asks zotero.org whose the key is and keeps only your user ID and \
user name: the key is not stored. You can delete it on zotero.org afterwards.",
zotero_key: "zotero.org API key",
connect: "Connect",
zotero_key_rejected: "zotero.org did not accept this key.",
zotero_unreachable: "zotero.org could not be reached. Please try again later.",
zotero_id_taken: "This zotero.org account belongs to another user here. If it is yours, \
please ask an admin of this server.",
account_expired: "This sign-in has expired. Please sign in again.",
signing_out: "Signing out",
signed_out_here: "You are signed out here. If nothing happens,",
continue_signing_out: "continue signing out",
authorize_zotero: "Authorize Zotero?",
authorized: "Authorized",
login_expired: "Login expired",
no_login_request: "No login request",
not_authorized: "Not authorized",
pending_signed_in: "A Zotero client asked to sync with this library. Approve only if you \
just started the login yourself.",
pending_sign_in: "A Zotero client asked to sync with this library. Sign in to approve, and \
only if you just started the login yourself.",
pending_key: "A Zotero client asked to sync with this library. Approve with an API key that \
may write to it, and only if you just started the login yourself.",
return_to_zotero: "You can close this page and return to Zotero.",
expired_message: "This login request is unknown or has expired. Start the login in Zotero \
again.",
missing_message: "Open this page from Zotero’s Settings → Sync → Log In.",
approve: "Approve",
approval_from_another_site: "The approval was sent from another site.",
not_allowed_to_approve: "You are not allowed to approve logins to this library.",
signed_in_as: "Signed in as",
storage_used: "Storage used",
of: "of",
no_limit: "no limit",
over_quota: "Your storage is full: new attachment files are refused until you delete some or an admin raises your quota.",
devices: "Devices",
devices_intro: "The keys your Zotero logins got. Revoke one to sign that device out.",
no_devices: "No devices yet: log in from Zotero to connect one.",
revoke: "Revoke",
added: "added",
last_used: "last used",
never_used: "not used yet",
admin: "Admin",
invites: "Invitations",
invites_intro: "Someone with an invited ORCID iD can sign in and gets a library of their own.",
no_invites: "Nobody is invited.",
invites_off: "Invitations do not apply: the sign-in provider decides who can sign in and get a library of their own, by their groups or roles. Someone who loses them is disabled when they next sign in, and enabled again when they sign in with them again, unless an admin disabled them. The owner and the admins named on the server need none.",
access_claim: "Claim",
access_users: "Users",
access_admins: "Admins",
disabled_by_provider: "disabled at sign-in: no longer in the group or role",
orcid_id: "ORCID iD",
note: "Note",
invite: "Invite",
uninvite: "Withdraw",
invite_used: "now user",
not_an_orcid: "That is not an ORCID iD.",
already_a_user: "That ORCID iD is a user already.",
not_a_quota: "A quota is a number of MB, or nothing for the default.",
users: "Users",
quota_mb: "Quota (MB)",
default_quota_is: "empty for the default:",
empty_for_no_limit: "empty for no limit",
save: "Save",
disable: "Disable",
enable: "Enable",
disabled: "disabled",
owner: "owner",
you: "you",
devices_count: "devices",
groups: "Groups",
groups_intro: "Your zotero.org groups, which the Defter plugin syncs with this server too. Groups, their members and what they may do are managed on",
no_groups: "No groups yet: they appear once the Defter plugin has synced.",
your_groups: "Your groups",
all_groups: "All groups",
search_groups: "Search for Groups",
search_groups_placeholder: "Search groups by name",
search_groups_hint: "Your groups and the public groups mirrored here. zotero.org finds all public groups:",
search_on_zotero: "Search on zotero.org",
no_groups_match: "No group matches.",
create_group: "Create a New Group",
groups_managed: "Groups are managed on zotero.org: create a group there, and change its profile, members and library. Changes reach defter at the next sync of the Defter plugin.",
group_profile: "Profile",
group_members: "Members",
group_library: "Library",
manage_profile: "Manage Profile",
manage_members: "Manage Members",
manage_library: "Manage Library",
view_on_zotero: "View on zotero.org",
group_type: "Group type",
type_private: "Private",
type_public_closed: "Public, closed membership",
type_public_open: "Public, open membership",
group_website: "Website",
library_reading: "Library reading",
library_editing: "Library editing",
file_editing: "File editing",
anyone: "Anyone on the internet",
any_member: "Any group member",
only_admins: "Only group admins",
no_one: "No group members",
not_on_defter: "zotero.org user",
members_here_only: "Of the members, those who use this server are listed.",
role_owner: "owner",
role_admin: "admin",
role_member: "member",
home: "Home",
public_profiles: "Public profiles",
search_profiles: "Search by name or ORCID iD",
search_button: "Search",
no_profiles: "No public profiles yet.",
no_profiles_match: "No public profile matches.",
page_word: "Page",
person_one: "person",
people: "people",
sign_in_to_approve: "Sign in to approve logins to this library.",
key_only_reads: "This key may only read; approve with one that may write.",
};
const PAGES_DE: Pages = Pages {
library: "Bibliothek",
library_version: "Bibliotheksversion",
user: "Nutzer",
items: "Einträge",
attachments: "Anhänge",
notes: "Notizen",
collections: "Sammlungen",
tags: "Tags",
in_trash: "Im Papierkorb",
files: "Dateien",
stored: "Gespeichert",
attachment_storage: "Dateispeicher",
backups: "Sicherungen",
backup_last: "Letzte Sicherung:",
backup_never: "Seit dem Start des Servers lief noch keine Sicherung.",
backup_off: "Geplante Sicherungen sind aus.",
backup_failed: "Die letzte Sicherung ist fehlgeschlagen:",
backup_warning: "Mit einer Warnung:",
signed_downloads: "Clients laden Dateien über vorsignierte URLs direkt aus dem Bucket.",
streamed_downloads: "Downloads laufen über diesen Server.",
files_up_to: "Dateien bis",
are_accepted: "werden angenommen.",
public_profile: "Öffentliches Profil",
profile_hidden: "Verborgen: Die Adresse antwortet mit „nicht gefunden“.",
profile_visible: "Für alle sichtbar.",
it_lists: "Es listet",
all_of_my_publications: ": alles aus „Meine Publikationen“ in Zotero.",
show_profile: "Profil anzeigen",
hide_profile: "Profil verbergen",
connect_zotero: "Zotero verbinden",
connect_intro: "defter arbeitet neben zotero.org: Zotero synchronisiert weiter mit \
zotero.org und Zotero Storage, und das Plugin defter for Zotero \
synchronisiert deine Bibliothek zusätzlich mit diesem Server. Erfordert \
Zotero 10.",
connect_download: "Lade",
connect_install: " herunter und installiere es in Zotero unter Werkzeuge → Plugins → \
Zahnradmenü → Plugin aus Datei installieren…",
connect_server: "Öffne in Zotero Einstellungen → Defter und wähle diesen Server aus:",
connect_login: "Klicke auf Anmelden, bestätige die Anmeldung auf diesem Server und dann auf \
Jetzt mit Defter synchronisieren.",
sync_heading: "commonmeta",
sync_intro: "Einmal am Tag tut commonmeta, was du hier wählst, jedes für sich. Es fügt \
die Werke deines ORCID-Datensatzes zu „Meine Publikationen“ hinzu: ein \
Eintrag, der eines enthält, kommt hinein, ein Werk, das deiner Bibliothek \
fehlt, wird dort angelegt. Und es aktualisiert die Metadaten der Werke \
deiner Bibliothek mit DOI aus seinem Bestand an Crossref- und \
DataCite-Datensätzen: Es ergänzt, was einem Eintrag fehlt – Titel, \
Zeitschrift, Erscheinungsdatum, Autoren, Sprache, Lizenz und mehr –, und \
hängt einem Eintrag ohne PDF ein PDF an, das es kennt. Ein Feld, das du \
ausgefüllt hast, bleibt: Wo ein Eintrag etwas anderes sagt oder einen \
anderen Typ hat, als sein Werk verlangt, legt commonmeta eine Dublette \
mit seinen Metadaten an, einmal für jede Fassung seines Datensatzes, die \
Zotero unter Doppelte Einträge zum Zusammenführen anbietet. Zotero \
übernimmt die Änderungen bei der nächsten Synchronisierung. Höchstens \
1.000 Einträge ändern sich pro Tag; der Rest folgt.",
sync_metadata: "Die Metadaten der Werke in meiner Zotero-Bibliothek aktualisieren",
sync_publications: "Die Werke meines ORCID-Datensatzes zu „Meine Publikationen“ hinzufügen",
sync_needs_orcid: "Dazu braucht dein Konto eine ORCID iD.",
sync_log: "Änderungen als JSON herunterladen",
sync_preview: "Änderungen ansehen",
sync_now: "Jetzt synchronisieren",
sync_running: "Deine Bibliothek wird gerade synchronisiert.",
sync_busy: "Eine andere Synchronisierung läuft; versuch es in ein paar Minuten noch einmal.",
sync_never: "Deine Bibliothek wurde noch nicht synchronisiert.",
sync_last: "Letzte Synchronisierung:",
sync_last_preview: "Letzte Vorschau:",
sync_details: "Änderungen",
sync_more: "weitere nicht angezeigt",
sync_ok: "fertig",
sync_partial: "fertig, mit Problemen",
sync_failed: "fehlgeschlagen",
sync_aborted: "abgebrochen, da die Synchronisierung ausgeschaltet wurde; die unten \
aufgeführten Änderungen wurden vorher gemacht",
sync_off: "aus",
sync_on_metadata: "Metadaten",
sync_on_publications: "Meine Publikationen",
sync_opted_in: "Nutzern synchronisieren ihre Bibliothek mit commonmeta",
sync_newest: "neueste Synchronisierung",
sync_last_failed: "letzte Synchronisierung fehlgeschlagen",
sign_in: "Anmelden",
api_key: "API-Schlüssel",
key_holders: "Status und Einstellungen dieser Bibliothek sehen nur Inhaber eines ihrer \
API-Schlüssel.",
needs_signing_in: "Für Status und Einstellungen dieser Bibliothek ist eine Anmeldung nötig.",
sign_in_with: "Mit",
sign_in_with_end: "anmelden",
approve_with_end: "anmelden und bestätigen",
from_another_site: "Die Anmeldung kam von einer anderen Website.",
not_a_key: "Das ist kein API-Schlüssel dieser Bibliothek.",
sign_in_failed: "Die Anmeldung hat nicht geklappt. Bitte versuche es noch einmal.",
no_orcid: "Dieses Konto hat keine ORCID iD, die für die Anmeldung hier nötig ist.",
not_allowed: "Dieses Konto hat keinen Zugang zu dieser Bibliothek.",
ask_admin_email: "Um defter zu nutzen, bitte darum, freigeschaltet zu werden – schreib an",
ask_admin: "Um defter zu nutzen, bitte die Admins dieses Servers oder die IT deiner \
Einrichtung, dich freizuschalten.",
connect_account: "Verbinde dein zotero.org-Konto",
connect_why: "Deine Nutzer-ID hier ist deine zotero.org-Nutzer-ID, damit dein Zotero \
dieselbe Bibliothek mit zotero.org und mit defter synchronisieren kann.",
connect_how: "Erstelle einen Schlüssel auf zotero.org; Lesezugriff genügt. Füge ihn hier ein:",
connect_key_page: "zotero.org → Settings → Security → Create new private key",
connect_kept: "defter fragt zotero.org, wem der Schlüssel gehört, und behält nur deine \
Nutzer-ID und deinen Nutzernamen: Der Schlüssel wird nicht gespeichert. Du \
kannst ihn danach auf zotero.org löschen.",
zotero_key: "zotero.org-API-Schlüssel",
connect: "Verbinden",
zotero_key_rejected: "zotero.org hat diesen Schlüssel nicht angenommen.",
zotero_unreachable: "zotero.org war nicht erreichbar. Bitte versuche es später noch einmal.",
zotero_id_taken: "Dieses zotero.org-Konto gehört hier schon jemand anderem. Wenn es \
deines ist, wende dich bitte an eine Verwaltungsperson dieses Servers.",
account_expired: "Diese Anmeldung ist abgelaufen. Bitte melde dich noch einmal an.",
signing_out: "Abmelden",
signed_out_here: "Du bist hier abgemeldet. Falls nichts passiert,",
continue_signing_out: "Abmeldung fortsetzen",
authorize_zotero: "Zotero zulassen?",
authorized: "Zugelassen",
login_expired: "Anmeldung abgelaufen",
no_login_request: "Keine Anmeldeanfrage",
not_authorized: "Nicht zugelassen",
pending_signed_in: "Ein Zotero-Client möchte mit dieser Bibliothek synchronisieren. Bestätige \
nur, wenn du die Anmeldung gerade selbst gestartet hast.",
pending_sign_in: "Ein Zotero-Client möchte mit dieser Bibliothek synchronisieren. Melde dich \
an, um zu bestätigen, und nur, wenn du die Anmeldung gerade selbst \
gestartet hast.",
pending_key: "Ein Zotero-Client möchte mit dieser Bibliothek synchronisieren. Bestätige mit \
einem API-Schlüssel mit Schreibrecht, und nur, wenn du die Anmeldung gerade \
selbst gestartet hast.",
return_to_zotero: "Du kannst diese Seite schließen und zu Zotero zurückkehren.",
expired_message: "Diese Anmeldeanfrage ist unbekannt oder abgelaufen. Starte die Anmeldung \
in Zotero noch einmal.",
missing_message: "Öffne diese Seite aus Zotero über Einstellungen → Sync → Anmelden.",
approve: "Bestätigen",
approval_from_another_site: "Die Bestätigung kam von einer anderen Website.",
not_allowed_to_approve: "Du darfst keine Anmeldungen bei dieser Bibliothek bestätigen.",
signed_in_as: "Angemeldet als",
storage_used: "Belegter Speicher",
of: "von",
no_limit: "unbegrenzt",
over_quota: "Dein Speicher ist voll: Neue Anhänge werden abgelehnt, bis du welche löschst oder eine Verwaltungsperson dein Kontingent erhöht.",
devices: "Geräte",
devices_intro: "Die Schlüssel, die deine Zotero-Anmeldungen erhalten haben. Widerrufe einen, um das Gerät abzumelden.",
no_devices: "Noch keine Geräte: Melde dich in Zotero an, um eines zu verbinden.",
revoke: "Widerrufen",
added: "hinzugefügt",
last_used: "zuletzt benutzt",
never_used: "noch nicht benutzt",
admin: "Verwaltung",
invites: "Einladungen",
invites_intro: "Wer eine eingeladene ORCID iD hat, kann sich anmelden und erhält eine eigene Bibliothek.",
no_invites: "Niemand ist eingeladen.",
invites_off: "Einladungen gelten nicht: Der Anmeldedienst entscheidet anhand der Gruppen oder Rollen, wer sich anmelden kann und eine eigene Bibliothek erhält. Wer sie verliert, wird bei der nächsten Anmeldung gesperrt und wieder entsperrt, wenn er sich mit ihnen wieder anmeldet, außer die Verwaltung hat ihn gesperrt. Der Inhaber und die auf dem Server genannten Admins brauchen keine.",
access_claim: "Claim",
access_users: "Benutzer",
access_admins: "Verwaltung",
disabled_by_provider: "bei der Anmeldung gesperrt: nicht mehr in der Gruppe oder Rolle",
orcid_id: "ORCID iD",
note: "Notiz",
invite: "Einladen",
uninvite: "Zurückziehen",
invite_used: "jetzt Benutzer",
not_an_orcid: "Das ist keine ORCID iD.",
already_a_user: "Diese ORCID iD gehört schon einem Benutzer.",
not_a_quota: "Ein Kontingent ist eine Zahl in MB, oder leer für den Standard.",
users: "Benutzer",
quota_mb: "Kontingent (MB)",
default_quota_is: "leer für den Standard:",
empty_for_no_limit: "leer für unbegrenzt",
save: "Speichern",
disable: "Sperren",
enable: "Entsperren",
disabled: "gesperrt",
owner: "Inhaber",
you: "du",
devices_count: "Geräte",
groups: "Gruppen",
groups_intro: "Deine zotero.org-Gruppen, die das Defter-Plugin auch mit diesem Server synchronisiert. Gruppen, ihre Mitglieder und was sie dürfen werden verwaltet auf",
no_groups: "Noch keine Gruppen: Sie erscheinen, sobald das Defter-Plugin synchronisiert hat.",
your_groups: "Deine Gruppen",
all_groups: "Alle Gruppen",
search_groups: "Gruppen suchen",
search_groups_placeholder: "Gruppen nach Namen suchen",
search_groups_hint: "Deine Gruppen und die öffentlichen Gruppen, die hier gespiegelt sind. zotero.org findet alle öffentlichen Gruppen:",
search_on_zotero: "Auf zotero.org suchen",
no_groups_match: "Keine Gruppe passt.",
create_group: "Neue Gruppe erstellen",
groups_managed: "Gruppen werden auf zotero.org verwaltet: Erstelle dort eine Gruppe und ändere ihr Profil, ihre Mitglieder und ihre Bibliothek. Änderungen erreichen defter bei der nächsten Synchronisierung des Defter-Plugins.",
group_profile: "Profil",
group_members: "Mitglieder",
group_library: "Bibliothek",
manage_profile: "Profil verwalten",
manage_members: "Mitglieder verwalten",
manage_library: "Bibliothek verwalten",
view_on_zotero: "Auf zotero.org ansehen",
group_type: "Gruppentyp",
type_private: "Privat",
type_public_closed: "Öffentlich, geschlossene Mitgliedschaft",
type_public_open: "Öffentlich, offene Mitgliedschaft",
group_website: "Website",
library_reading: "Bibliothek lesen",
library_editing: "Bibliothek bearbeiten",
file_editing: "Dateien bearbeiten",
anyone: "Alle im Internet",
any_member: "Alle Gruppenmitglieder",
only_admins: "Nur Gruppen-Admins",
no_one: "Keine Gruppenmitglieder",
not_on_defter: "zotero.org-Nutzer",
members_here_only: "Von den Mitgliedern sind die aufgeführt, die diesen Server nutzen.",
role_owner: "Inhaber",
role_admin: "Admin",
role_member: "Mitglied",
home: "Startseite",
public_profiles: "Öffentliche Profile",
search_profiles: "Nach Name oder ORCID iD suchen",
search_button: "Suchen",
no_profiles: "Noch keine öffentlichen Profile.",
no_profiles_match: "Kein öffentliches Profil passt.",
page_word: "Seite",
person_one: "Person",
people: "Personen",
sign_in_to_approve: "Melde dich an, um Anmeldungen bei dieser Bibliothek zu bestätigen.",
key_only_reads: "Dieser Schlüssel darf nur lesen; bestätige mit einem mit Schreibrecht.",
};
pub struct LayoutText {
pub lang: &'static str,
pub toggle_dark: &'static str,
pub sign_out: &'static str,
pub sign_in: &'static str,
pub settings: &'static str,
pub public_profile: &'static str,
pub admin_settings: &'static str,
pub orcid_profile: &'static str,
pub account_menu: &'static str,
pub language: &'static str,
pub apply: &'static str,
pub tagline: &'static str,
pub built_with: &'static str,
pub by: &'static str,
pub software: &'static str,
pub mit_license: &'static str,
}
pub const LAYOUT_EN: LayoutText = LayoutText {
lang: "en",
toggle_dark: "Toggle dark mode",
sign_out: "Sign out",
sign_in: "Sign in",
settings: "Settings",
public_profile: "Public Profile",
admin_settings: "Admin Settings",
orcid_profile: "ORCID profile",
account_menu: "Account menu",
language: "Language",
apply: "Apply",
tagline: "Self-hosted Zotero sync and file storage",
built_with: "Built with",
by: "by",
software: "software provided under an",
mit_license: "MIT license",
};
const LAYOUT_DE: LayoutText = LayoutText {
lang: "de",
toggle_dark: "Dunkelmodus umschalten",
sign_out: "Abmelden",
sign_in: "Anmelden",
settings: "Einstellungen",
public_profile: "Öffentliches Profil",
admin_settings: "Admin-Einstellungen",
orcid_profile: "ORCID-Profil",
account_menu: "Kontomenü",
language: "Sprache",
apply: "Anwenden",
tagline: "Selbst gehostete Zotero-Synchronisierung und Dateiablage",
built_with: "Erstellt mit",
by: "von",
software: "Software bereitgestellt unter einer",
mit_license: "MIT-Lizenz",
};
const MONTHS_EN: [&str; 12] = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
];
const MONTHS_DE: [&str; 12] = [
"Januar",
"Februar",
"März",
"April",
"Mai",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"Dezember",
];
const ITEM_TYPES_DE: &[(&str, &str)] = &[
("artwork", "Kunstwerk"),
("audioRecording", "Tonaufnahme"),
("bill", "Gesetzentwurf"),
("blogPost", "Blogbeitrag"),
("book", "Buch"),
("bookSection", "Buchkapitel"),
("case", "Gerichtsentscheidung"),
("computerProgram", "Software"),
("conferencePaper", "Konferenzbeitrag"),
("dataset", "Datensatz"),
("dictionaryEntry", "Wörterbucheintrag"),
("document", "Dokument"),
("email", "E-Mail"),
("encyclopediaArticle", "Lexikonartikel"),
("film", "Film"),
("forumPost", "Forumsbeitrag"),
("hearing", "Anhörung"),
("instantMessage", "Sofortnachricht"),
("interview", "Interview"),
("journalArticle", "Zeitschriftenartikel"),
("letter", "Brief"),
("magazineArticle", "Magazinartikel"),
("manuscript", "Manuskript"),
("map", "Karte"),
("newspaperArticle", "Zeitungsartikel"),
("patent", "Patent"),
("podcast", "Podcast"),
("preprint", "Preprint"),
("presentation", "Präsentation"),
("radioBroadcast", "Radiosendung"),
("report", "Bericht"),
("standard", "Norm"),
("statute", "Gesetz"),
("thesis", "Abschlussarbeit"),
("tvBroadcast", "Fernsehsendung"),
("videoRecording", "Videoaufnahme"),
("webpage", "Webseite"),
];
const LANGUAGES: &[(&str, &str, &str)] = &[
("ar", "Arabic", "Arabisch"),
("cs", "Czech", "Tschechisch"),
("da", "Danish", "Dänisch"),
("de", "German", "Deutsch"),
("el", "Greek", "Griechisch"),
("en", "English", "Englisch"),
("es", "Spanish", "Spanisch"),
("fi", "Finnish", "Finnisch"),
("fr", "French", "Französisch"),
("he", "Hebrew", "Hebräisch"),
("hu", "Hungarian", "Ungarisch"),
("it", "Italian", "Italienisch"),
("ja", "Japanese", "Japanisch"),
("ko", "Korean", "Koreanisch"),
("nb", "Norwegian", "Norwegisch"),
("nl", "Dutch", "Niederländisch"),
("no", "Norwegian", "Norwegisch"),
("pl", "Polish", "Polnisch"),
("pt", "Portuguese", "Portugiesisch"),
("ru", "Russian", "Russisch"),
("sv", "Swedish", "Schwedisch"),
("tr", "Turkish", "Türkisch"),
("zh", "Chinese", "Chinesisch"),
];
impl Lang {
pub const ALL: [Lang; 2] = [Lang::En, Lang::De];
pub fn parse(code: &str) -> Option<Lang> {
match code.to_ascii_lowercase().as_str() {
"en" => Some(Lang::En),
"de" => Some(Lang::De),
_ => None,
}
}
pub fn from_accept_language(header: &str) -> Lang {
header
.split(',')
.filter_map(|tag| {
let tag = tag.split(';').next()?.trim();
Lang::parse(tag.split('-').next()?)
})
.next()
.unwrap_or(Lang::En)
}
pub fn code(&self) -> &'static str {
match self {
Lang::En => "en",
Lang::De => "de",
}
}
pub fn name(&self) -> &'static str {
match self {
Lang::En => "English",
Lang::De => "Deutsch",
}
}
pub fn citation_locale(self) -> &'static str {
match self {
Lang::En => "en-US",
Lang::De => "de-DE",
}
}
pub fn text(self) -> &'static Text {
match self {
Lang::En => &EN,
Lang::De => &DE,
}
}
pub fn pages(self) -> &'static Pages {
match self {
Lang::En => &PAGES_EN,
Lang::De => &PAGES_DE,
}
}
pub fn decimal(self, number: &str) -> String {
match self {
Lang::En => number.to_string(),
Lang::De => number.replace('.', ","),
}
}
pub fn layout(self) -> &'static LayoutText {
match self {
Lang::En => &LAYOUT_EN,
Lang::De => &LAYOUT_DE,
}
}
pub fn count(&self, n: usize) -> String {
let separator = match self {
Lang::En => ',',
Lang::De => '.',
};
let digits = n.to_string();
let mut out = String::with_capacity(digits.len() + digits.len() / 3);
for (i, digit) in digits.chars().enumerate() {
if i > 0 && (digits.len() - i).is_multiple_of(3) {
out.push(separator);
}
out.push(digit);
}
out
}
pub fn works(self, n: usize) -> String {
let noun = match (self, n) {
(Lang::En, 1) => "work",
(Lang::En, _) => "works",
(_, 1) => "Werk",
(_, _) => "Werke",
};
format!("{} {noun}", self.count(n))
}
pub fn sync_counts(self, s: &commonmeta::zotero::SyncSummary, preview: bool) -> String {
let with_doi = self.count(s.with_doi + s.deferred);
let items = self.count(s.items);
let head = match (self, s.items) {
(Lang::En, 1) => format!("{items} item, {with_doi} with a DOI"),
(Lang::En, _) => format!("{items} items, {with_doi} with a DOI"),
(Lang::De, 1) => format!("{items} Eintrag, {with_doi} mit DOI"),
(Lang::De, _) => format!("{items} Einträge, {with_doi} mit DOI"),
};
let counts = [
(
s.updated,
"updated",
"to update",
"aktualisiert",
"zu aktualisieren",
),
(
s.created,
"added to My Publications",
"to add to My Publications",
"zu „Meine Publikationen“ hinzugefügt",
"zu „Meine Publikationen“ hinzuzufügen",
),
(
s.published,
"put into My Publications",
"to put into My Publications",
"in „Meine Publikationen“ aufgenommen",
"in „Meine Publikationen“ aufzunehmen",
),
(
s.orcid_concepts,
"left out of My Publications (concept DOI without a PDF)",
"to leave out of My Publications (concept DOI without a PDF)",
"nicht in „Meine Publikationen“ (Konzept-DOI ohne PDF)",
"nicht in „Meine Publikationen“ aufzunehmen (Konzept-DOI ohne PDF)",
),
(
s.pdfs,
"PDFs attached",
"PDFs to attach",
"PDFs angehängt",
"PDFs anzuhängen",
),
(
s.duplicates,
"duplicates with commonmeta's metadata, to merge in Zotero",
"duplicates with commonmeta's metadata to create",
"Dubletten mit den Metadaten von commonmeta, in Zotero zusammenzuführen",
"Dubletten mit den Metadaten von commonmeta anzulegen",
),
(
s.conflicts,
"changed meanwhile, left for the next sync",
"changed meanwhile",
"inzwischen geändert, für die nächste Synchronisierung gelassen",
"inzwischen geändert",
),
(
s.failed,
"failed",
"failed",
"fehlgeschlagen",
"fehlgeschlagen",
),
(
s.deferred,
"left for the next sync",
"left for the next sync",
"für die nächste Synchronisierung gelassen",
"für die nächste Synchronisierung gelassen",
),
];
let done: Vec<String> = counts
.iter()
.filter(|c| c.0 > 0)
.map(|&(n, en, en_preview, de, de_preview)| {
let words = match (self, preview) {
(Lang::En, false) => en,
(Lang::En, true) => en_preview,
(Lang::De, false) => de,
(Lang::De, true) => de_preview,
};
format!("{} {words}", self.count(n))
})
.collect();
if done.is_empty() {
let nothing = match self {
Lang::En => "nothing to change",
Lang::De => "nichts zu ändern",
};
return format!("{head}: {nothing}");
}
format!("{head}: {}", done.join(", "))
}
pub fn page_of(self, page: usize, pages: usize) -> String {
let (page, pages) = (self.count(page), self.count(pages));
match self {
Lang::En => format!("page {page} of {pages}"),
Lang::De => format!("Seite {page} von {pages}"),
}
}
pub fn date(self, date: &str) -> String {
let parts: Vec<&str> = date.trim().split('-').collect();
let months = match self {
Lang::En => &MONTHS_EN,
Lang::De => &MONTHS_DE,
};
let month = parts
.get(1)
.and_then(|m| m.parse::<usize>().ok())
.and_then(|m| months.get(m.wrapping_sub(1)));
let day = parts.get(2).and_then(|d| d.parse::<u32>().ok());
match (self, parts[0], month, day) {
(Lang::En, year, Some(month), Some(day)) => format!("{month} {day}, {year}"),
(_, year, Some(month), Some(day)) => format!("{day}. {month} {year}"),
(_, year, Some(month), None) => format!("{month} {year}"),
(_, year, _, _) => year.to_string(),
}
}
pub fn date_range(self, start: &str, end: &str) -> String {
let text = self.text();
match (start.trim().is_empty(), end.trim().is_empty()) {
(false, false) => format!("{} – {}", self.date(start), self.date(end)),
(false, true) => format!("{} {}", text.started, self.date(start)),
(true, false) => format!("{} {}", text.ended, self.date(end)),
(true, true) => String::new(),
}
}
pub fn item_type(self, item_type: &str) -> String {
if self != Lang::En
&& let Some((_, label)) = ITEM_TYPES_DE.iter().find(|(t, _)| *t == item_type)
{
return label.to_string();
}
let mut label = String::new();
for (i, c) in item_type.chars().enumerate() {
if i == 0 {
label.extend(c.to_uppercase());
} else if c.is_uppercase() {
label.push(' ');
label.extend(c.to_lowercase());
} else {
label.push(c);
}
}
label
}
pub fn language(self, language: &str) -> String {
let language = language.trim();
let primary = language
.split('-')
.next()
.unwrap_or("")
.to_ascii_lowercase();
match LANGUAGES.iter().find(|(code, _, _)| *code == primary) {
Some((_, en, _)) if self == Lang::En => en.to_string(),
Some((_, _, de)) => de.to_string(),
None => language.to_string(),
}
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn picks_a_language_from_the_browser() {
let accept = Lang::from_accept_language;
assert_eq!(accept("de-DE,de;q=0.9,en;q=0.8"), Lang::De);
assert_eq!(accept("de-AT,de;q=0.9"), Lang::De);
assert_eq!(accept("fr-FR,fr;q=0.9,de;q=0.8,en;q=0.7"), Lang::De);
assert_eq!(accept("en-GB,de;q=0.5"), Lang::En);
assert_eq!(accept("fr"), Lang::En);
assert_eq!(accept(""), Lang::En);
}
#[test]
fn formats_dates_and_ranges() {
assert_eq!(Lang::En.date("2015"), "2015");
assert_eq!(Lang::En.date("2015-08"), "August 2015");
assert_eq!(Lang::En.date("2021-08-01"), "August 1, 2021");
assert_eq!(Lang::De.date("2021-08-01"), "1. August 2021");
assert_eq!(Lang::De.date("2015-03"), "März 2015");
assert_eq!(Lang::De.date("2021-01-05"), "5. Januar 2021");
assert_eq!(Lang::En.date("May 2021"), "May 2021");
assert_eq!(
Lang::En.date_range("2021-08-01", ""),
"Started August 1, 2021"
);
assert_eq!(
Lang::De.date_range("2021-08-01", ""),
"Beginn 1. August 2021"
);
assert_eq!(
Lang::En.date_range("2015-08", "2021-07-31"),
"August 2015 – July 31, 2021"
);
assert_eq!(Lang::En.date_range("", ""), "");
}
#[test]
fn a_left_out_concept_is_counted() {
let s = commonmeta::zotero::SyncSummary {
items: 3,
with_doi: 3,
orcid_concepts: 1,
..Default::default()
};
assert_eq!(
Lang::En.sync_counts(&s, false),
"3 items, 3 with a DOI: 1 left out of My Publications (concept DOI without a PDF)"
);
assert!(
Lang::En
.sync_counts(&s, true)
.ends_with("1 to leave out of My Publications (concept DOI without a PDF)")
);
assert!(
Lang::De
.sync_counts(&s, false)
.ends_with("1 nicht in „Meine Publikationen“ (Konzept-DOI ohne PDF)")
);
}
#[test]
fn counts_in_the_page_language() {
assert_eq!(Lang::En.count(1043), "1,043");
assert_eq!(Lang::De.count(1043), "1.043");
assert_eq!(Lang::En.count(999), "999");
assert_eq!(Lang::En.works(1), "1 work");
assert_eq!(Lang::De.works(1043), "1.043 Werke");
assert_eq!(Lang::De.page_of(1, 105), "Seite 1 von 105");
}
#[test]
fn names_types_and_languages() {
assert_eq!(Lang::En.item_type("blogPost"), "Blog post");
assert_eq!(Lang::De.item_type("blogPost"), "Blogbeitrag");
assert_eq!(Lang::De.item_type("unknownType"), "Unknown type");
assert_eq!(Lang::En.language("en-US"), "English");
assert_eq!(Lang::De.language("en"), "Englisch");
assert_eq!(Lang::En.language("Klingon"), "Klingon");
}
}