Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 008591f

Browse files
author
Barry de Graaff
committed
fixing more i18n
1 parent 8736694 commit 008591f

File tree

4 files changed

+26
-36
lines changed

4 files changed

+26
-36
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ This Zimlet offers support for Seafile. Read more https://github.com/Zimbra-Comm
198198
3. Running a WebDAV server behind and NGINX reverse proxy (from CentOS or Debian) won't work, it will work when proper options are enabled (as for example with zimbra-proxy, also based on NGINX).
199199
4. Delay of 30 seconds in response from Nextcloud, the brute force login protection has kicked in. Configure X-Forwarded-For see above! Or and this is not recommended: set in your Nextcloud the preference `'auth.bruteforce.protection.enabled' => false,` and issue `truncate table bruteforce_attempts;`
200200
5. Download menu option does not work on Safari on iPad, solution: disable pop-up blocker
201+
6. Public link sharing does not work. Install the `File sharing` app on Nextcloud and disable Password Policy (if needed). Also you must have (re)sharing rights in Nextcloud for public link share to work.
201202

202203
See:
203204
https://github.com/Zimbra-Community/owncloud-zimlet/wiki/Troubleshooting

zimlet/OwnCloudListView.js

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -430,37 +430,33 @@ OwnCloudListView.prototype._sendFileListener = function(ev) {
430430
if(owncloud_zimlet_disable_ocs_public_link_shares != 'true')
431431
{
432432
html += '<tr><td><input type="radio" checked name="ownCloudZimletShareTypeSelector" id="ownCloudZimletShareTypeSelectorPublic" value="public"></td><td>'
433-
+(zimletInstance.getMessage('publicLinkFileFolder') != '' ?
434-
zimletInstance.getMessage('publicLinkFileFolder')
435-
: ZmMsg.shareWithPublic)
433+
+(zimletInstance.getMessage('publicLinkFileFolder').indexOf('???') == 0 ?
434+
ZmMsg.shareWithPublic :zimletInstance.getMessage('publicLinkFileFolder')
435+
)
436436
+'</td></tr>';
437437
var passwordPlaceholder = '';
438438
if (tk_barrydegraaff_owncloud_zimlet_HandlerObject.settings['owncloud_zimlet_link_enforce_password'] == 'true')
439439
{
440-
passwordPlaceholder = zimletInstance.getMessage('requiredPassword') != '' ?
441-
zimletInstance.getMessage('requiredPassword')
442-
: (ZmMsg.requiredLabel).toLowerCase() + ' ' + (ZmMsg.password).toLowerCase();
440+
passwordPlaceholder = zimletInstance.getMessage('requiredPassword').indexOf('???') == 0 ?
441+
(ZmMsg.requiredLabel).toLowerCase() + ' ' + (ZmMsg.password).toLowerCase() : zimletInstance.getMessage('requiredPassword');
443442
}
444443
else
445444
{
446-
passwordPlaceholder = zimletInstance.getMessage('optionalPassword') != '' ?
447-
zimletInstance.getMessage('optionalPassword')
448-
: (ZmMsg.optionalInvitees).toLowerCase() + ' ' + (ZmMsg.password).toLowerCase();
445+
passwordPlaceholder = zimletInstance.getMessage('optionalPassword').indexOf('???') == 0 ?
446+
(ZmMsg.optionalInvitees).toLowerCase() + ' ' + (ZmMsg.password).toLowerCase() : zimletInstance.getMessage('optionalPassword');
449447
}
450448
html += '<tr><td></td><td><input placeholder="'+passwordPlaceholder+'" id="tk_barrydegraaff_owncloud_zimlet-sharedLinkPass" type="sharePassword"></td></tr>';
451449

452450
var expiryDateLabel = '';
453451
if (tk_barrydegraaff_owncloud_zimlet_HandlerObject.settings['owncloud_zimlet_link_enforce_date'] == 'true')
454452
{
455-
expiryDateLabel = zimletInstance.getMessage('requiredExpiryDate') != '' ?
456-
zimletInstance.getMessage('requiredExpiryDate')
457-
: zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.requiredLabel.toLowerCase().replace(":","")+")";
453+
expiryDateLabel = zimletInstance.getMessage('requiredExpiryDate').indexOf('???') == 0 ?
454+
zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.requiredLabel.toLowerCase().replace(":","")+")" : zimletInstance.getMessage('requiredExpiryDate');
458455
}
459456
else
460457
{
461-
expiryDateLabel = zimletInstance.getMessage('optionalExpiryDate') != '' ?
462-
zimletInstance.getMessage('optionalExpiryDate')
463-
: zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.optionalLabel.toLowerCase().replace(":","")+")";
458+
expiryDateLabel = zimletInstance.getMessage('optionalExpiryDate').indexOf('???') == 0 ?
459+
zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.optionalLabel.toLowerCase().replace(":","")+")" : zimletInstance.getMessage('optionalExpiryDate');
464460
}
465461

466462
//prevent selection of day in the past

zimlet/OwnCloudTabView.js

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ function OwnCloudTabView(parent, zimletCtxt, davConnector, ownCloudConnector, oc
3333
checked: true,
3434
name: 'ownCloudZimletShareTypeSelector'
3535
});
36-
this._checkboxf.setText(zimletInstance.getMessage('attachFileFolder') != '' ?
37-
zimletInstance.getMessage('attachFileFolder')
38-
: ZmMsg.attach.charAt(0).toUpperCase() + ZmMsg.attach.slice(1) + " " + (ZmMsg.file).toLowerCase() + "/" + (ZmMsg.folder).toLowerCase());
36+
this._checkboxf.setText(zimletInstance.getMessage('attachFileFolder').indexOf('???') == 0 ?
37+
ZmMsg.attach.charAt(0).toUpperCase() + ZmMsg.attach.slice(1) + " " + (ZmMsg.file).toLowerCase() + "/" + (ZmMsg.folder).toLowerCase() : zimletInstance.getMessage('attachFileFolder'));
3938

4039
this._tree = new DwtTree({
4140
parent: this,
@@ -53,9 +52,9 @@ function OwnCloudTabView(parent, zimletCtxt, davConnector, ownCloudConnector, oc
5352
style: DwtCheckbox.TEXT_RIGHT,
5453
name: 'ownCloudZimletShareTypeSelector'
5554
});
56-
this._checkbox.setText(zimletInstance.getMessage('publicLinkFileFolder') != '' ?
57-
zimletInstance.getMessage('publicLinkFileFolder') :
58-
ZmMsg.shareWithPublic + " " + (ZmMsg.linkTo).toLowerCase() + " " + (ZmMsg.file).toLowerCase() + "/" + (ZmMsg.folder).toLowerCase());
55+
this._checkbox.setText(zimletInstance.getMessage('publicLinkFileFolder').indexOf('???') == 0 ?
56+
ZmMsg.shareWithPublic + " " + (ZmMsg.linkTo).toLowerCase() + " " + (ZmMsg.file).toLowerCase() + "/" + (ZmMsg.folder).toLowerCase() : zimletInstance.getMessage('publicLinkFileFolder'));
57+
5958

6059
this._sharePasswordTxt = new DwtText({
6160
parent: this,
@@ -73,23 +72,20 @@ function OwnCloudTabView(parent, zimletCtxt, davConnector, ownCloudConnector, oc
7372
}
7473
else
7574
{
76-
this._sharePassword._inputField.placeholder = zimletInstance.getMessage('optionalPassword') != '' ?
77-
zimletInstance.getMessage('optionalPassword')
78-
: (ZmMsg.optionalInvitees).toLowerCase() + " " + (ZmMsg.password).toLowerCase();
75+
this._sharePassword._inputField.placeholder = zimletInstance.getMessage('optionalPassword').indexOf('???') == 0 ?
76+
(ZmMsg.optionalInvitees).toLowerCase() + " " + (ZmMsg.password).toLowerCase() : zimletInstance.getMessage('optionalPassword');
7977
}
8078

8179
var expiryDateLabel = '';
8280
if (tk_barrydegraaff_owncloud_zimlet_HandlerObject.settings['owncloud_zimlet_link_enforce_date'] == 'true')
8381
{
84-
expiryDateLabel = zimletInstance.getMessage('requiredExpiryDate') != '' ?
85-
zimletInstance.getMessage('requiredExpiryDate')
86-
: zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.requiredLabel.toLowerCase().replace(":","")+")";
82+
expiryDateLabel = zimletInstance.getMessage('requiredExpiryDate').indexOf('???') == 0 ?
83+
zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.requiredLabel.toLowerCase().replace(":","")+")" : zimletInstance.getMessage('requiredExpiryDate');
8784
}
8885
else
8986
{
90-
expiryDateLabel = zimletInstance.getMessage('optionalExpiryDate') != '' ?
91-
zimletInstance.getMessage('optionalExpiryDate')
92-
: zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.optionalLabel.toLowerCase().replace(":","")+")";
87+
expiryDateLabel = zimletInstance.getMessage('optionalExpiryDate').indexOf('???') == 0 ?
88+
zimletInstance.getMessage('expiryDate') + " ("+ZmMsg.optionalLabel.toLowerCase().replace(":","")+")" : zimletInstance.getMessage('optionalExpiryDate');
9389
}
9490

9591
this._shareExpiryDate = new DwtInputField({
@@ -100,7 +96,7 @@ function OwnCloudTabView(parent, zimletCtxt, davConnector, ownCloudConnector, oc
10096
//Internet Explorer 11 does not like `.type = 'date'`, if
10197
//we drop support for IE11, we can enable a date picker here
10298
//this._shareExpiryDate._inputField.type = 'date';
103-
this._shareExpiryDate._inputField.placeholder = zimletInstance.getMessage('datePlaceholder');
99+
this._shareExpiryDate._inputField.placeholder = zimletInstance.getMessage('datePlaceholder').indexOf('???') == 0 ? "YYYY-MM-DD" : zimletInstance.getMessage('datePlaceholder');
104100

105101
var expiryDays = '';
106102
if (tk_barrydegraaff_owncloud_zimlet_HandlerObject.settings['owncloud_zimlet_link_expiry_days'] != '')

zimlet/tk_barrydegraaff_owncloud_zimlet.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
This file is part of the Zimbra ownCloud Zimlet project.
3-
Copyright (C) 2015-2021 Barry de Graaff
3+
Copyright (C) 2015-2019 Barry de Graaff
44
55
Bugs and feedback: https://github.com/barrydegraaff/owncloud-zimlet/issues
66
@@ -761,10 +761,7 @@ ownCloudZimlet.prototype.showAttachmentDialog =
761761
function() {
762762
var attachDialog = this._attachDialog = appCtxt.getAttachDialog();
763763
var zimletInstance = appCtxt._zimletMgr.getZimletByName('tk_barrydegraaff_owncloud_zimlet').handlerObject;
764-
attachDialog.setTitle(zimletInstance.getMessage('attachFrom') != '' ?
765-
AjxMessageFormat.format(zimletInstance.getMessage('attachFrom'),
766-
[zimletInstance._zimletContext.getConfig("owncloud_zimlet_app_title")])
767-
: ZmMsg.attach + ' ' + (ZmMsg.from).toLowerCase() + ' ' + zimletInstance._zimletContext.getConfig("owncloud_zimlet_app_title"));
764+
attachDialog.setTitle(zimletInstance._zimletContext.getConfig("owncloud_zimlet_app_title"));
768765
this.removePrevAttDialogContent(attachDialog._getContentDiv().firstChild);
769766

770767
if (!this.AttachContactsView || !this.AttachContactsView.attachDialog){

0 commit comments

Comments
 (0)