Skip to content

TagSpaces is an offline, open source, document manager with tagging support

i18n-ing

Iliande24ba29bd01
diff --git a/data/index.html b/data/index.html
index 956b50c6d..7721b99f1 100644
--- a/data/index.html
+++ b/data/index.html
@@ -80,7 +80,7 @@ can be found in the LICENSE file.
</div>
</div>
</nav>
- <div class="ts-container">
+ <div class="ts-container" style="overflow-x: hidden;">
<div id="tagGroupsContent"></div>
<div id="locationContent"></div>
<div id="contactUsContent">
@@ -329,35 +329,35 @@ can be found in the LICENSE file.
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <h4>Create New File</h4>
+ <h4 data-i18n="ns.dialogs:createNewFileTitle">Create New File</h4>
</div>
<div class="modal-body form">
<div class="form-group">
- <label class="control-label" for="newFileName">Title</label>
+ <label class="control-label" for="newFileName" data-i18n="ns.dialogs:newFileTitle">Title</label>
<input type="text" id="newFileName" class="form-control" placeholder="Title of the file">
</div>
<div class="form-group">
- <label class="control-label" for="newFileNameTags">Tags</label>
+ <label class="control-label" for="newFileNameTags" data-i18n="ns.dialogs:newFileTags">Tags</label>
<input type="text" id="newFileNameTags" name="newFileNameTags" autocomplete="off" class="form-control" placeholder="List of tags">
- <p class="help-block">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
+ <p class="help-block" data-i18n="ns.dialogs:editTagNamesRestrictionsHelp">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
</div>
<div class="form-group">
- <label class="control-label" for="fileTypeChooser">Type</label><br>
+ <label class="control-label" for="fileTypeChooser" data-i18n="ns.dialogs:newFileType">Type</label><br>
<div class="btn-group" data-toggle="buttons" id="fileTypeChooser">
<label class="btn btn-default active" id="txtFileTypeButton" title="Create a TXT File">
- <input type="radio" name="options"> <strong>Plain Text</strong> (.txt)
+ <input type="radio" name="options"> <strong data-i18n="ns.dialogs:newFileTypePlain">Plain Text</strong> (.txt)
</label>
<label class="btn btn-default" id="htmlFileTypeButton" title="Create a HTML File">
- <input type="radio" name="options"> <strong>Rich Text</strong> (.html)
+ <input type="radio" name="options"> <strong data-i18n="ns.dialogs:newFileTypeRich">Rich Text</strong> (.html)
</label>
<label class="btn btn-default" id="mdFileTypeButton" title="Create a MarkDown File">
- <input type="radio" name="options"> <strong>MarkDown</strong> (.md)
+ <input type="radio" name="options"> <strong data-i18n="ns.dialogs:newFileTypeMD">MarkDown</strong> (.md)
</label>
</div>
</div>
<div class="form-group">
<label class="checkbox">
- <input type="checkbox" id="tagWithCurrentDate"> Tag with current date (e.g. 20131210 for the 10th of December, 2013)
+ <input type="checkbox" id="tagWithCurrentDate">&nbsp;<span data-i18n="ns.dialogs:tagWithCurrentDate">Tag with current date (e.g. 20131208 for the 8th of December, 2013)</span>
</label>
</div>
</div>
@@ -374,11 +374,11 @@ can be found in the LICENSE file.
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <h4>Rename File</h4>
+ <h4 data-i18n="ns.dialogs:renameFileTitle">Rename File</h4>
</div>
<div class="modal-body form">
<div class="form-group">
- <label class="control-label" for="renamedFileName">New Filename</label>
+ <label class="control-label" for="renamedFileName" data-i18n="ns.dialogs:renameNewFileName">New Filename</label>
<input class="form-control" type="text" name="renamedFileName" id="renamedFileName" />
</div>
</div>
@@ -395,13 +395,13 @@ can be found in the LICENSE file.
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <h4>Edit Tag</h4>
+ <h4 data-i18n="ns.dialogs:editTagTitle">Edit Tag</h4>
</div>
<div class="modal-body form">
<div class="form-group">
- <label class="control-label" for="newTagName">Tag Name</label>
+ <label class="control-label" for="newTagName" data-i18n="ns.dialogs:editTagNewName">Tag Name</label>
<input class="form-control" type="text" id="newTagName">
- <p class="help-block">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
+ <p class="help-block" data-i18n="ns.dialogs:editTagNamesRestrictionsHelp">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
</div>
</div>
<div class="modal-footer">
@@ -417,19 +417,19 @@ can be found in the LICENSE file.
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <h4>Tag operation on multiple files</h4>
+ <h4 data-i18n="ns.dialogs:tagOperationTitle">Tag operation on multiple files</h4>
</div>
<div class="modal-body form">
<div class="form-group">
- <label class="control-label" for="tags">Tags</label>
- <input class="form-control" type="text" name="tags" id="tags" autocomplete="off" placeholder="List of tags"/>
- <p class="help-block">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
+ <label class="control-label" for="tags" data-i18n="ns.dialogs:tagOperationTag">Tags</label>
+ <input class="form-control" type="text" name="tags" id="tags" autocomplete="off" data-i18n="[placeholder]ns.dialogs:tagOperationListOfTags"/>
+ <p class="help-block" data-i18n="ns.dialogs:editTagNamesRestrictionsHelp">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <button id="removeTagsButton" class="btn btn-warning" data-dismiss="modal" aria-hidden="true">Remove Tags</button>
- <button id="addTagsButton" class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Add Tags</button>
+ <button id="removeTagsButton" class="btn btn-warning" data-dismiss="modal" aria-hidden="true" data-i18n="ns.dialogs:tagOperationRemoveTag">Remove Tags</button>
+ <button id="addTagsButton" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" data-i18n="ns.dialogs:tagOperationAddTag">Add Tags</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
@@ -440,16 +440,16 @@ can be found in the LICENSE file.
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <h4>Edit Tag</h4>
+ <h4 data-i18n="ns.dialogs:editTagMasterTitle">Edit Tag</h4>
</div>
<div class="modal-body form">
<div class="form-group">
- <label class="control-label" for="tagInTreeName">Name</label>
+ <label class="control-label" for="tagInTreeName" data-i18n="ns.dialogs:editTagMasterName">Name</label>
<input class="form-control" type="text" name="tagInTreeName" id="tagInTreeName" />
- <p class="help-block">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
+ <p class="help-block" data-i18n="ns.dialogs:editTagNamesRestrictionsHelp">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
</div>
<div class="form-group">
- <label class="control-label" for="tagColor">Color</label>
+ <label class="control-label" for="tagColor" data-i18n="ns.dialogs:editTagMasterColor">Color</label>
<select class="form-control" id="tagColor" >
<option value="#ac725e">#ac725e</option>
<option value="#d06b64">#d06b64</option>
@@ -476,7 +476,7 @@ can be found in the LICENSE file.
</select>
</div>
<div class="form-group">
- <label class="control-label" for="tagTextColor">Text Color</label>
+ <label class="control-label" for="tagTextColor" data-i18n="ns.dialogs:editTagMasterTextColor">Text Color</label>
<select class="form-control" id="tagTextColor">
<option value="#ffffff">#ffffff</option>
<option value="#cccccc">#cccccc</option>
@@ -498,13 +498,13 @@ can be found in the LICENSE file.
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <h4>Add tags to tag group</h4>
+ <h4 data-i18n="ns.dialogs:addTagsToGroupTitle">Add tags to tag group</h4>
</div>
<div class="modal-body form">
<div class="form-group">
- <label class="control-label" for="newTagTitle">Tags</label>
- <input class="form-control" type="text" name="newTagTitle" id="newTagTitle" placeholder="Comma separated list of tags" />
- <p class="help-block">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
+ <label class="control-label" for="newTagTitle" data-i18n="ns.dialogs:addTagsToGroupTags">Tags</label>
+ <input class="form-control" type="text" name="newTagTitle" id="newTagTitle" data-i18n="[placeholder]ns.dialogs:addTagsToGroupTagsPlaceholder" />
+ <p class="help-block" data-i18n="ns.dialogs:editTagNamesRestrictionsHelp">Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\ and other.</p>
</div>
</div>
<div class="modal-footer">
@@ -520,11 +520,11 @@ can be found in the LICENSE file.
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <h4>Edit TagGroup</h4>
+ <h4 data-i18n="ns.dialogs:editTagGroupTitle">Edit Tag Group</h4>
</div>
<div class="modal-body form">
<div class="form-group">
- <label class="control-label" for="tagGroupName">TagGroup Name</label>
+ <label class="control-label" for="tagGroupName" data-i18n="ns.dialogs:editTagGroupNewName">Tag Group Name</label>
<input class="form-control" type="text" name="tagGroupName" id="tagGroupName" />
</div>
</div>
@@ -541,11 +541,11 @@ can be found in the LICENSE file.
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-lg"></i></button>
- <h4>Create TagGroup</h4>
+ <h4 data-i18n="ns.dialogs:createTagGroupTitle">Create Tag Group</h4>
</div>
<div class="modal-body form">
<div class="form-group">
- <label class="control-label" for="newTagGroupName">TagGroup Name</label>
+ <label class="control-label" for="newTagGroupName" data-i18n="ns.dialogs:createTagGroupName">Tag Group Name</label>
<input class="form-control" type="text" name="newTagGroupName" id="newTagGroupName" />
</div>
</div>
diff --git a/data/js/core.ui.js b/data/js/core.ui.js
index 1a118063d..dece1d8d6 100644
--- a/data/js/core.ui.js
+++ b/data/js/core.ui.js
@@ -122,6 +122,7 @@ define(function(require, exports, module) {
$('body').append(uiTemplate());
TSCORE.directoryBrowser.initUI();
}
+ $("#directoryBrowserDialog").i18n();
TSCORE.IO.listSubDirectories(path);
});
};
@@ -136,6 +137,7 @@ define(function(require, exports, module) {
$('body').append(uiTemplate());
controller.initUI();
}
+ $("#dialogOptions").i18n();
controller.reInitUI();
});
};
@@ -149,6 +151,7 @@ define(function(require, exports, module) {
$('body').append(uiTemplate());
$('#welcomeCarosel').carousel();
}
+ $("#dialogWelcome").i18n();
$("#dialogWelcome").modal({backdrop: 'static',show: true});
});
};
diff --git a/data/js/directories.ui.js b/data/js/directories.ui.js
index a08421a32..fdaffa422 100644
--- a/data/js/directories.ui.js
+++ b/data/js/directories.ui.js
@@ -532,6 +532,7 @@ define(function(require, exports, module) {
$connectionName2.val(name);
$connectionName2.attr("oldName",name);
$folderLocation2.val(path);
+ $("#dialogLocationEdit").i18n();
$("#dialogLocationEdit").modal({backdrop: 'static',show: true});
});
}
@@ -566,6 +567,7 @@ define(function(require, exports, module) {
}
$("#connectionName").val("");
$("#folderLocation").val("");
+ $("#dialogCreateFolderConnection").i18n();
$("#dialogCreateFolderConnection").modal({backdrop: 'static',show: true});
});
}
@@ -594,6 +596,7 @@ define(function(require, exports, module) {
}
$( "#createNewDirectoryButton" ).attr("path", dirPath);
$("#newDirectoryName").val("");
+ $('#dialogDirectoryCreate').i18n();
$('#dialogDirectoryCreate').modal({backdrop: 'static',show: true});
});
}
diff --git a/data/js/fileopener.js b/data/js/fileopener.js
index 62100115a..aa6551bb3 100644
--- a/data/js/fileopener.js
+++ b/data/js/fileopener.js
@@ -488,8 +488,9 @@
}
$("#filePathProperty").val(_openedFileProperties.path);
$("#fileSizeProperty").val(_openedFileProperties.size);
- $("#fileLMDTProperty").val(new Date(_openedFileProperties.lmdt));
- $('#dialogFileProperties').modal({backdrop: 'static',show: true});
+ $("#fileLMDTProperty").val(new Date(_openedFileProperties.lmdt));
+ $('#dialogFileProperties').i18n();
+ $('#dialogFileProperties').modal({backdrop: 'static',show: true});
});
}
diff --git a/data/locales/de/ns.dialogs.json b/data/locales/de/ns.dialogs.json
index c851b8281..e74d48c5a 100644
--- a/data/locales/de/ns.dialogs.json
+++ b/data/locales/de/ns.dialogs.json
@@ -23,5 +23,6 @@
"selectedPathExistTitleAlert": "Doppelter Orts-Pfad",
"deleteLocationContentAlert": "Soll die Verbindung '__locationName__' wirklich gelöscht werden?",
"deleteLocationTitleAlert": "Verbindung löschen",
+ "welcomeDialogTitle": "Willkommen in TagSpaces",
"-": "-"
}
\ No newline at end of file
diff --git a/data/locales/en/ns.dialogs.json b/data/locales/en/ns.dialogs.json
index b21b50755..ab2c0d66c 100644
--- a/data/locales/en/ns.dialogs.json
+++ b/data/locales/en/ns.dialogs.json
@@ -23,5 +23,65 @@
"selectedPathExistTitleAlert": "Duplicated Location Path",
"deleteLocationContentAlert": "Do you want to delete the connection '__locationName__'?",
"deleteLocationTitleAlert": "Delete connection",
+ "welcomeDialogTitle": "Welcome to TagSpaces",
+ "createNewFileTitle": "Create New File",
+ "newFileTitle": "Title",
+ "newFileTags": "Tags",
+ "newFileType": "Type",
+ "newFileTypePlain": "Plain Text",
+ "newFileTypeRich": "Rich Text",
+ "newFileTypeMD": "MarkDown",
+ "tagWithCurrentDate": "Tag with current date (e.g. 20131208 for the 8th of December, 2013)",
+ "renameFileTitle": "Rename File",
+ "renameNewFileName": "New Filename",
+ "selectDialogTitle": "Select Directory",
+ "selectDialogCurrentPath": "Current Path",
+ "editTagTitle": "Edit Tag",
+ "editTagNewName": "New Tag Name",
+ "editTagNamesRestrictionsHelp": "Tags should have a minimum length of 2 characters and should not contain special characters such as spaces, #, / ,\\ and other.",
+ "tagOperationTitle": "Tag operation on multiple files",
+ "tagOperationTag": "Tags",
+ "tagOperationTagsPlaceholder": "List of tags",
+ "tagOperationAddTag": "Add Tags",
+ "tagOperationRemoveTag": "Remove Tags",
+ "editTagMasterTitle": "Edit Tag",
+ "editTagMasterName": "Name",
+ "editTagMasterColor": "Color",
+ "editTagMasterTextColor": "Text Color",
+ "addTagsToGroupTitle": "Add tags to tag group",
+ "addTagsToGroupTags": "Tags",
+ "addTagsToGroupTagsPlaceholder": "Comma separated list of tags",
+ "editTagGroupTitle": "Edit Tag Group",
+ "editTagGroupNewName": "Tag Group Name",
+ "createTagGroupTitle": "Create Tag Group",
+ "createTagGroupName": "Tag Group Name",
+ "createNewDirectoryTitle": "Create New Directory",
+ "createNewDirectoryTitleName": "New Directory Name",
+ "filePropertiesTitle": "File Properties",
+ "filePropertiesPath": "Path",
+ "filePropertiesSize": "Size in Bytes",
+ "filePropertiesLMDT": "Last Modified Datetime",
+ "createLocationTitle": "Connect a Location",
+ "createLocationPath": "Location Path",
+ "createLocationName": "Location Name",
+ "createLocationDefaultPerspective": "Default Perspective",
+ "editLocationTitle": "Edit Location",
+ "editLocationPath": "Location Path",
+ "locationPathPlaceholder": "Example: c:\\users\\johnsmith\\documents",
+ "editLocationName": "Location Name",
+ "locationNamePlaceholder": "Example: My Documents",
+ "editLocationDefaultPerspective": "Default Perspective",
+ "removeLocation": "Remove Location",
+ "locationPathSelectFolder": "Select local folder",
+ "": "",
+ "": "",
+ "": "",
+ "": "",
+ "": "",
+ "": "",
+ "": "",
+ "": "",
+ "": "",
+ "": "",
"-": "-"
}
\ No newline at end of file
diff --git a/data/templates/OptionsDialog.html b/data/templates/OptionsDialog.html
index 8a4a4f22b..b3400a762 100644
--- a/data/templates/OptionsDialog.html
+++ b/data/templates/OptionsDialog.html
@@ -17,7 +17,7 @@
<div class="tab-content">
<div class="tab-pane active" id="general" style="height: 320px; padding-top: 10px; overflow-y: auto;">
<div class='form-group col-sm-12'>
- <label for='extensionsPathInput' data-i18n="app.extensionsFolder">Interface Language</label>
+ <label for='languagesList' data-i18n="">Interface Language</label>
<select class='form-control' id='languagesList'></select>
<p class="help-block">Switching language will fully take effect after restarting the application</p>
</div>
@@ -112,8 +112,7 @@
<div class='form-group col-sm-12'>
<label for='extensionsPathInput' data-i18n="app.extensionsFolder">Extensions folder (default value is "ext")</label>
<input type='text' class='form-control' id='extensionsPathInput'
- data-i18n="[placeholder]app" placeholder='file:///c:\\tagspaces-extensions'
- data-i18n="[title]app" title='Path to your tagspaces extensions'/>
+ data-i18n="[placeholder]app" placeholder='file:///c:\\tagspaces-extensions;[title]app' title='Path to your tagspaces extensions'/>
</div>
<!--button class="btn btn-default" style="margin-bottom: 10px" id="switchLang" data-i18n="[title]app.switchLanguageTooltip;">
<i class="fa fa-asterisk"> Test Change Language</i>
@@ -130,18 +129,14 @@
<label for='tagsDelimiterInput' data-i18n="app.extensionsFolder">Tag delimiter (e.g.
Filename[TAG1_TAG2], _ is the delimiter)</label>
<input type='text' class='form-control' id='tagsDelimiterInput'
- data-i18n="[placeholder]app" placeholder=''
- data-i18n="[title]app" title=''/>
+ data-i18n="[placeholder]app;[title]app" placeholder='' title=''/>
</div>
<div class='form-group col-sm-12'>
<label for='prefixTagContainerInput' data-i18n="app.extensionsFolder">Prefix for the tag
container (e.g. in "Filename-[TAG1].txt" - is the prefix) </label>
- <input type='text' class='form-control' id='prefixTagContainerInput'
- data-i18n="[placeholder]app"
- data-i18n="[title]app"/>
+ <input type='text' class='form-control' id='prefixTagContainerInput' data-i18n="[placeholder]app;[title]app"/>
</div>
</div>
-
</div>
</div>
<div class="modal-footer">