Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Activity/Settings/FileSigned.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function getIdentifier(): string {
*/
#[\Override]
public function getName(): string {
// TRANSLATORS Activity app setting label for LibreSign events when a document finishes being digitally signed. Keep the <strong> markup.
return $this->l->t('A document has been <strong>signed</strong>');
}

Expand Down
1 change: 1 addition & 0 deletions lib/Activity/Settings/FileToSign.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function getIdentifier(): string {
*/
#[\Override]
public function getName(): string {
// TRANSLATORS Activity app setting label for LibreSign events when the current user has a pending document to sign. Keep the <strong> markup.
return $this->l->t('You have a <strong>file to sign</strong>');
}
}
1 change: 1 addition & 0 deletions lib/Activity/Settings/SignRequestCanceled.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function getIdentifier(): string {
*/
#[\Override]
public function getName(): string {
// TRANSLATORS Activity app setting label for LibreSign events when a signature request is canceled before completion. Keep the <strong> markup.
return $this->l->t('A signature request has been <strong>canceled</strong>');
}

Expand Down
2 changes: 2 additions & 0 deletions lib/Handler/FooterHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public function setTemplateVar(string $name, mixed $value): self {
private function prepareTemplateVars(): array {
if (!$this->templateVars->getSignedBy()) {
$this->templateVars->setSignedBy(
// TRANSLATORS Default PDF footer sentence stamped after LibreSign applies a digital signature; readers see this on the finished document.
$this->appConfig->getValueString(Application::APP_ID, 'footer_signed_by', $this->l10n->t('Digitally signed by LibreSign.'))
);
}
Expand Down Expand Up @@ -149,6 +150,7 @@ private function prepareTemplateVars(): array {
if (!$this->templateVars->getValidateIn()) {
$validateIn = $this->appConfig->getValueString(Application::APP_ID, 'footer_validate_in', 'Validate in %s.');
if ($validateIn === 'Validate in %s.') {
// TRANSLATORS Default PDF footer line after signing. "Validate" means check that the digital signature is authentic on LibreSign's public validation page, not approve a document. %s is the validation site URL or name.
$this->templateVars->setValidateIn($this->l10n->t('Validate in %s.', ['%s']));
} else {
$this->templateVars->setValidateIn($validateIn);
Expand Down
3 changes: 3 additions & 0 deletions lib/Listener/TwofactorGatewayListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ protected function sendSignNotification(
}

if ($isFirstNotification) {
// TRANSLATORS SMS/gateway body sent via Nextcloud Twofactor Gateway when LibreSign first asks someone to sign a document; a signing link follows this sentence.
$message .= $this->l10n->t('There is a document for you to sign. Access the link below:');
} else {
// TRANSLATORS SMS/gateway body sent via Nextcloud Twofactor Gateway when a pending LibreSign signing request was updated and the signer must open the link again.
$message .= $this->l10n->t('Changes have been made in a file that you have to sign. Access the link below:');
}
$message .= "\n";
Expand Down Expand Up @@ -147,6 +149,7 @@ protected function sendSignedNotification(
return;
}

// TRANSLATORS SMS/gateway subject line sent via Nextcloud Twofactor Gateway after a LibreSign document was signed; details and a validation link follow.
$message = $this->l10n->t('LibreSign: A file has been signed');
$message .= "\n";
// TRANSLATORS The text in the message that is sent after a document has been signed by a user. %s will be replaced with the name of the user who signed the document.
Expand Down
1 change: 1 addition & 0 deletions lib/Settings/AdminSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function getID(): string {
*/
#[\Override]
public function getName(): string {
// TRANSLATORS Nextcloud Administration settings section name for the LibreSign digital signature app.
return $this->l->t('LibreSign');
}

Expand Down
10 changes: 10 additions & 0 deletions lib/SetupCheck/PDFtkSetupCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public function run(): SetupResult {

if (!$pdftkPath) {
return SetupResult::error(
// TRANSLATORS Nextcloud administration overview warning. PDFtk is the Java tool LibreSign uses to stamp the signature footer onto PDFs; the configured path is empty.
$this->l10n->t('PDFtk not found'),
// TRANSLATORS Tip under a Nextcloud administration overview error. Instructs the server administrator to install PDFtk for LibreSign via the Nextcloud occ CLI.
$this->l10n->t('Run occ libresign:install --pdftk')
);
}
Expand All @@ -84,15 +86,19 @@ public function run(): SetupResult {

if (!file_exists($pdftkPath)) {
return SetupResult::error(
// TRANSLATORS Nextcloud administration overview warning. PDFtk stamps LibreSign's PDF footer during signing; %s is the configured filesystem path that does not exist.
$this->l10n->t('PDFtk binary not found: %s', [$pdftkPath]),
// TRANSLATORS Tip under a Nextcloud administration overview error. Instructs the server administrator to install PDFtk for LibreSign via the Nextcloud occ CLI.
$this->l10n->t('Run occ libresign:install --pdftk')
);
}

$javaPath = $this->javaHelper->getJavaPath();
if (!$javaPath || !file_exists($javaPath)) {
return SetupResult::error(
// TRANSLATORS Nextcloud administration overview warning. LibreSign runs PDFtk as a Java JAR to write the signed PDF footer, so a working Java runtime is required.
$this->l10n->t('Necessary Java to run PDFtk'),
// TRANSLATORS Tip under a Nextcloud administration overview error. Instructs the server administrator to install the Java runtime LibreSign needs via the Nextcloud occ CLI.
$this->l10n->t('Run occ libresign:install --java')
);
}
Expand All @@ -101,7 +107,9 @@ public function run(): SetupResult {
exec($javaPath . ' -jar ' . $pdftkPath . ' --version 2>&1', $versionOutput, $resultCode);
if (empty($versionOutput) || $resultCode !== 0) {
return SetupResult::error(
// TRANSLATORS Nextcloud administration overview warning. LibreSign could not read the PDFtk version string used to stamp signed PDF footers.
$this->l10n->t('Failure to check PDFtk version.'),
// TRANSLATORS Tip under a Nextcloud administration overview error. Instructs the server administrator to reinstall PDFtk for LibreSign via the Nextcloud occ CLI.
$this->l10n->t('Run occ libresign:install --pdftk')
);
}
Expand All @@ -112,7 +120,9 @@ public function run(): SetupResult {

if (!$version) {
return SetupResult::error(
// TRANSLATORS Nextcloud administration overview warning. The file at %s does not look like the PDFtk JAR LibreSign expects for PDF footer stamping.
$this->l10n->t('PDFtk binary is invalid: %s', [$pdftkPath]),
// TRANSLATORS Tip under a Nextcloud administration overview error. Instructs the server administrator to reinstall PDFtk for LibreSign via the Nextcloud occ CLI.
$this->l10n->t('Run occ libresign:install --pdftk')
);
}
Expand Down
Loading