mirror of
https://github.com/documize/community.git
synced 2025-07-19 05:09:42 +02:00
i18n fixes
This commit is contained in:
parent
e56263564c
commit
6c8b10753d
11 changed files with 18 additions and 17 deletions
10
build.bat
10
build.bat
|
@ -55,12 +55,4 @@ robocopy /e /NFL /NDL /NJH domain\onboard\*.json edition\static\onboard
|
||||||
|
|
||||||
echo "Compiling Windows"
|
echo "Compiling Windows"
|
||||||
set GOOS=windows
|
set GOOS=windows
|
||||||
go build -mod=vendor -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-windows-amd64.exe edition/community.go
|
go build -mod=vendor -trimpath -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-windows-amd64.exe edition/community.go
|
||||||
|
|
||||||
echo "Compiling Linux"
|
|
||||||
set GOOS=linux
|
|
||||||
go build -mod=vendor -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-linux-amd64 edition/community.go
|
|
||||||
|
|
||||||
echo "Compiling Darwin"
|
|
||||||
set GOOS=darwin
|
|
||||||
go build -mod=vendor -gcflags="all=-trimpath=$GOPATH" -o bin/documize-community-darwin-amd64 edition/community.go
|
|
||||||
|
|
|
@ -176,6 +176,7 @@ func processDocument(ctx domain.RequestContext, r *env.Runtime, store *store.Sto
|
||||||
document.UserID = ctx.UserID
|
document.UserID = ctx.UserID
|
||||||
documentID := uniqueid.Generate()
|
documentID := uniqueid.Generate()
|
||||||
document.RefID = documentID
|
document.RefID = documentID
|
||||||
|
document.Sequence = doc.Unsequenced
|
||||||
|
|
||||||
if r.Product.Edition == domain.CommunityEdition {
|
if r.Product.Edition == domain.CommunityEdition {
|
||||||
document.Lifecycle = workflow.LifecycleLive
|
document.Lifecycle = workflow.LifecycleLive
|
||||||
|
|
|
@ -66,6 +66,8 @@ func FilterCategoryProtected(docs []doc.Document, cats []category.Category, memb
|
||||||
|
|
||||||
// CopyDocument clones an existing document
|
// CopyDocument clones an existing document
|
||||||
func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) (newDocumentID string, err error) {
|
func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) (newDocumentID string, err error) {
|
||||||
|
unseq := doc.Unsequenced
|
||||||
|
|
||||||
doc, err := s.Document.Get(ctx, documentID)
|
doc, err := s.Document.Get(ctx, documentID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = errors.Wrap(err, "unable to fetch existing document")
|
err = errors.Wrap(err, "unable to fetch existing document")
|
||||||
|
@ -79,6 +81,7 @@ func CopyDocument(ctx domain.RequestContext, s store.Store, documentID string) (
|
||||||
doc.VersionID = ""
|
doc.VersionID = ""
|
||||||
doc.GroupID = ""
|
doc.GroupID = ""
|
||||||
doc.Template = false
|
doc.Template = false
|
||||||
|
doc.Sequence = unseq
|
||||||
|
|
||||||
// Duplicate pages and associated meta
|
// Duplicate pages and associated meta
|
||||||
pages, err := s.Page.GetPages(ctx, documentID)
|
pages, err := s.Page.GetPages(ctx, documentID)
|
||||||
|
|
|
@ -93,6 +93,7 @@ func (h *Handler) SavedList(w http.ResponseWriter, r *http.Request) {
|
||||||
func (h *Handler) SaveAs(w http.ResponseWriter, r *http.Request) {
|
func (h *Handler) SaveAs(w http.ResponseWriter, r *http.Request) {
|
||||||
method := "template.saved"
|
method := "template.saved"
|
||||||
ctx := domain.GetRequestContext(r)
|
ctx := domain.GetRequestContext(r)
|
||||||
|
unseq := doc.Unsequenced
|
||||||
|
|
||||||
if !h.Runtime.Product.IsValid(ctx) {
|
if !h.Runtime.Product.IsValid(ctx) {
|
||||||
response.WriteBadLicense(w)
|
response.WriteBadLicense(w)
|
||||||
|
@ -149,6 +150,7 @@ func (h *Handler) SaveAs(w http.ResponseWriter, r *http.Request) {
|
||||||
doc.ID = 0
|
doc.ID = 0
|
||||||
doc.Template = true
|
doc.Template = true
|
||||||
doc.Lifecycle = workflow.LifecycleLive
|
doc.Lifecycle = workflow.LifecycleLive
|
||||||
|
doc.Sequence = unseq
|
||||||
|
|
||||||
// Duplicate pages and associated meta
|
// Duplicate pages and associated meta
|
||||||
pages, err := h.Store.Page.GetPages(ctx, model.DocumentID)
|
pages, err := h.Store.Page.GetPages(ctx, model.DocumentID)
|
||||||
|
@ -342,6 +344,7 @@ func (h *Handler) Use(w http.ResponseWriter, r *http.Request) {
|
||||||
d.SpaceID = spaceID
|
d.SpaceID = spaceID
|
||||||
d.UserID = ctx.UserID
|
d.UserID = ctx.UserID
|
||||||
d.Name = docTitle
|
d.Name = docTitle
|
||||||
|
d.Sequence = doc.Unsequenced
|
||||||
|
|
||||||
if h.Runtime.Product.Edition == domain.CommunityEdition {
|
if h.Runtime.Product.Edition == domain.CommunityEdition {
|
||||||
d.Lifecycle = workflow.LifecycleLive
|
d.Lifecycle = workflow.LifecycleLive
|
||||||
|
|
|
@ -65,6 +65,7 @@ export default Component.extend(Modals, Notifier, {
|
||||||
// Handle upload clicks on button and anything inside that button.
|
// Handle upload clicks on button and anything inside that button.
|
||||||
// But only if user can edit this document.
|
// But only if user can edit this document.
|
||||||
if (!this.get('canEdit')) return;
|
if (!this.get('canEdit')) return;
|
||||||
|
let uploaded = this.i18n.localize('uploaded');
|
||||||
|
|
||||||
let sel = ['#upload-document-files ', '#upload-document-files > i'];
|
let sel = ['#upload-document-files ', '#upload-document-files > i'];
|
||||||
for (var i=0; i < 2; i++) {
|
for (var i=0; i < 2; i++) {
|
||||||
|
@ -87,7 +88,7 @@ export default Component.extend(Modals, Notifier, {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.on("queuecomplete", function () {
|
this.on("queuecomplete", function () {
|
||||||
self.notifySuccess(this.i18n.localize('uploaded'));
|
self.notifySuccess(uploaded);
|
||||||
self.getAttachments();
|
self.getAttachments();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,10 @@ export default Component.extend({
|
||||||
selected: false,
|
selected: false,
|
||||||
ariaRole: "button",
|
ariaRole: "button",
|
||||||
tabindex: 0,
|
tabindex: 0,
|
||||||
|
attributeBindings: ['title'],
|
||||||
|
title: computed('tooltip', function() {
|
||||||
|
return this.tooltip;
|
||||||
|
}),
|
||||||
|
|
||||||
calcClass: computed('selected', function() {
|
calcClass: computed('selected', function() {
|
||||||
let c = '';
|
let c = '';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div id={{concat "content-linker-modal-" page.id}} class="modal" tabindex="-1" role="dialog">
|
<div id={{concat "content-linker-modal-" page.id}} class="modal" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">{{localize 'link-insert'}}</div>
|
<div class="modal-header">{{localize 'link_insert'}}</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<ul class="tabnav-control text-center">
|
<ul class="tabnav-control text-center">
|
||||||
{{#if hasSections}}
|
{{#if hasSections}}
|
||||||
|
|
|
@ -1,4 +1 @@
|
||||||
{{label}}
|
{{label}}
|
||||||
{{#if tooltip}}
|
|
||||||
{{#attach-tooltip showDelay=750}}{{tooltip}}{{/attach-tooltip}}
|
|
||||||
{{/if}}
|
|
|
@ -190,7 +190,7 @@
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
|
|
||||||
"toc": "table of contents",
|
"toc": "table of contents",
|
||||||
"new_canvas": "Blank anvas",
|
"new_canvas": "Blank canvas",
|
||||||
"new_template": "From template",
|
"new_template": "From template",
|
||||||
"new_import": "Import files",
|
"new_import": "Import files",
|
||||||
"new_import_explain1": "Click to select files or drag-drop files",
|
"new_import_explain1": "Click to select files or drag-drop files",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue