lesli_babel 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/lesli_babel/application.js +108 -52
- data/app/assets/javascripts/lesli_babel/application.js.LICENSE.txt +282 -0
- data/app/assets/stylesheets/lesli_babel/application.scss +2 -1
- data/app/assets/stylesheets/lesli_babel/dashboards.scss +3 -2
- data/app/controllers/lesli_babel/buckets_controller.rb +32 -8
- data/app/controllers/lesli_babel/modules_controller.rb +24 -18
- data/app/controllers/lesli_babel/strings_controller.rb +10 -10
- data/app/controllers/lesli_babel/translations_controller.rb +23 -12
- data/app/models/lesli_babel/module.rb +10 -1
- data/app/models/lesli_babel/string.rb +26 -9
- data/app/services/lesli_babel/deploy_rails_service.rb +93 -0
- data/app/services/lesli_babel/module_service.rb +1 -1
- data/app/services/lesli_babel/string_service.rb +6 -3
- data/app/views/lesli_babel/partials/_engine-sidebar.html.erb +9 -11
- data/config/locales/translations.en.yml +5 -0
- data/config/locales/translations.es.yml +5 -0
- data/config/routes.rb +16 -16
- data/db/migrate/v1.0/0901100110_create_lesli_babel_modules.rb +2 -2
- data/db/migrate/v1.0/0901110110_create_lesli_babel_buckets.rb +1 -1
- data/lib/lesli_babel/version.rb +2 -1
- data/lib/tasks/lesli_babel_tasks.rake +38 -56
- data/lib/vue/application.js +23 -9
- data/lib/vue/apps/modules/show.vue +26 -17
- data/lib/vue/components/form-string-new.vue +51 -63
- data/lib/vue/stores/module.js +25 -11
- data/lib/vue/stores/translations.js +1 -1
- data/lib/vue/stores/translations.json +38 -0
- data/readme.md +61 -9
- metadata +11 -5
@@ -0,0 +1,93 @@
|
|
1
|
+
module LesliBabel
|
2
|
+
class DeployRailsService < Lesli::ApplicationLesliService
|
3
|
+
|
4
|
+
def build
|
5
|
+
|
6
|
+
Lesli::System.engines.each do |engine, engine_info|
|
7
|
+
|
8
|
+
L2.br(30)
|
9
|
+
L2.info
|
10
|
+
|
11
|
+
# get all rails engines to buil
|
12
|
+
engine_id = Module
|
13
|
+
.where("platform in ('lesli_core', 'lesli_engine')")
|
14
|
+
.where(:code => engine_info[:code])
|
15
|
+
.pluck(:id)
|
16
|
+
|
17
|
+
# get strings filtered by module (only rails translations)
|
18
|
+
strings = StringService.new(current_user, query).list #(engine_id)
|
19
|
+
|
20
|
+
strings = strings.select(
|
21
|
+
:id,
|
22
|
+
:label,
|
23
|
+
:status,
|
24
|
+
:context,
|
25
|
+
Lesli.config.locales.keys,
|
26
|
+
"lesli_babel_modules.id as engine_id",
|
27
|
+
"lesli_babel_buckets.id as bucket_id",
|
28
|
+
"lesli_babel_buckets.code as bucket_code",
|
29
|
+
"lesli_babel_modules.code as engine_code",
|
30
|
+
"lesli_babel_modules.platform as platform",
|
31
|
+
"'' as path"
|
32
|
+
)
|
33
|
+
|
34
|
+
translations = {}
|
35
|
+
|
36
|
+
available_locales = Lesli.config.locales.keys
|
37
|
+
|
38
|
+
# add key for every available language (required by i18n Rails gem)
|
39
|
+
available_locales.each do |lang|
|
40
|
+
translations[lang] = {
|
41
|
+
:file => "",
|
42
|
+
:labels => {}
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
engine_code = engine_info[:code]
|
47
|
+
|
48
|
+
available_locales.each do |lang|
|
49
|
+
|
50
|
+
# translations path for lesli core
|
51
|
+
translations[lang][:file] = "#{engine}::Engine".constantize.root.join(
|
52
|
+
"config", "locales", "translations.#{lang}.yml"
|
53
|
+
).to_s
|
54
|
+
|
55
|
+
strings.each do |string|
|
56
|
+
|
57
|
+
bucket_code = string[:bucket_code]
|
58
|
+
|
59
|
+
unless translations[lang][:labels].has_key? engine_code
|
60
|
+
translations[lang][:labels][engine_code] = { }
|
61
|
+
end
|
62
|
+
|
63
|
+
unless translations[lang][:labels][engine_code].has_key? bucket_code
|
64
|
+
translations[lang][:labels][engine_code][bucket_code] = { }
|
65
|
+
end
|
66
|
+
|
67
|
+
# # send debug message for missing translations
|
68
|
+
string[lang] = ":" + string.path + ":" if string[lang].blank?
|
69
|
+
|
70
|
+
translations[lang][:labels][engine_code][bucket_code][string.label] = string[lang]
|
71
|
+
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
translations.each do |lang, translations|
|
77
|
+
|
78
|
+
# creates folder and subfolders
|
79
|
+
FileUtils.makedirs(File.dirname(translations[:file]))
|
80
|
+
|
81
|
+
# creates translation file for every available language
|
82
|
+
translation_file = File.new(translations[:file], "w+")
|
83
|
+
|
84
|
+
translation_file.write({ "#{lang}": translations[:labels] }.to_yaml)
|
85
|
+
|
86
|
+
translation_file.close
|
87
|
+
|
88
|
+
L2.msg "file added: #{ translations[:file] }"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -8,7 +8,7 @@ module LesliBabel
|
|
8
8
|
|
9
9
|
# get list of ids of installed engines and available third-party apps
|
10
10
|
Module
|
11
|
-
.where(:
|
11
|
+
.where(:code => babel_modules_names) # -> only installed engines
|
12
12
|
#.or(Module.where.not(:platform => ["rails_core", "rails_builder", "rails_engine"]))
|
13
13
|
.map { |engine| engine.id }
|
14
14
|
|
@@ -23,7 +23,8 @@ module LesliBabel
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def index params
|
26
|
-
|
26
|
+
|
27
|
+
strings = self.list(params[:module]).select(
|
27
28
|
:id,
|
28
29
|
:label,
|
29
30
|
:status,
|
@@ -31,12 +32,14 @@ module LesliBabel
|
|
31
32
|
Lesli.config.locales.keys,
|
32
33
|
"lesli_babel_modules.id as engine_id",
|
33
34
|
"lesli_babel_buckets.id as bucket_id",
|
34
|
-
"lesli_babel_buckets.
|
35
|
-
"lesli_babel_modules.
|
35
|
+
"lesli_babel_buckets.code as bucket_code",
|
36
|
+
"lesli_babel_modules.code as engine_code",
|
36
37
|
"lesli_babel_modules.platform as platform",
|
37
38
|
"'' as path"
|
38
39
|
)
|
39
40
|
|
41
|
+
#strings = strings.where()
|
42
|
+
|
40
43
|
strings = strings
|
41
44
|
.page(query[:pagination][:page])
|
42
45
|
.per(query[:pagination][:perPage])
|
@@ -32,14 +32,12 @@ Building a better future, one line of code at a time.
|
|
32
32
|
=end
|
33
33
|
%>
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<%= navigation_item(
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<%= navigation_item(lesli_babel.dashboard_path, "Team", "ri-folder-settings-line"); %>
|
45
|
-
<%= navigation_item(lesli_babel.dashboard_path, "Notes", "ri-folder-settings-line"); %>
|
35
|
+
|
36
|
+
<p class="menu-label">Modules</p>
|
37
|
+
<% LesliBabel::Module.all.order(:platform, :code).each do |engine| %>
|
38
|
+
<%= navigation_item(
|
39
|
+
lesli_babel.modules_path + "/" + engine.id.to_s,
|
40
|
+
engine.code.titleize,
|
41
|
+
"ri-folder-settings-line"
|
42
|
+
); %>
|
43
|
+
<% end %>
|
data/config/routes.rb
CHANGED
@@ -30,21 +30,14 @@ Building a better future, one line of code at a time.
|
|
30
30
|
// ·
|
31
31
|
=end
|
32
32
|
|
33
|
-
LesliBabel::Engine.routes.draw do
|
34
|
-
|
33
|
+
LesliBabel::Engine.routes.draw do
|
35
34
|
root to: "dashboards#show"
|
36
35
|
resource :dashboard
|
37
36
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
collection do
|
43
|
-
get :stats
|
44
|
-
get :locales
|
45
|
-
get :relevant
|
46
|
-
end
|
47
|
-
end
|
37
|
+
# working with modules
|
38
|
+
resources :modules, only: [:index, :show, :new, :create, :edit] do
|
39
|
+
resources :buckets, only: [:index]
|
40
|
+
end
|
48
41
|
|
49
42
|
# working with translations
|
50
43
|
resources :translations, only: [:index] do
|
@@ -56,8 +49,15 @@ LesliBabel::Engine.routes.draw do
|
|
56
49
|
end
|
57
50
|
end
|
58
51
|
|
59
|
-
#
|
60
|
-
resources :
|
61
|
-
|
62
|
-
|
52
|
+
# relevant strings
|
53
|
+
resources :relevants, only: [:index]
|
54
|
+
|
55
|
+
# working with strings
|
56
|
+
resources :strings, only: [:index, :create, :update] do
|
57
|
+
collection do
|
58
|
+
get :stats
|
59
|
+
get :locales
|
60
|
+
get :relevant
|
61
|
+
end
|
62
|
+
end
|
63
63
|
end
|
@@ -33,8 +33,8 @@ Building a better future, one line of code at a time.
|
|
33
33
|
class CreateLesliBabelModules < ActiveRecord::Migration[7.0]
|
34
34
|
def change
|
35
35
|
create_table :lesli_babel_modules do |t|
|
36
|
-
t.string :
|
37
|
-
t.string :platform # rails, reactnative
|
36
|
+
t.string :code # engine code
|
37
|
+
t.string :platform # rails, reactnative, etc
|
38
38
|
t.datetime :deleted_at
|
39
39
|
t.timestamps
|
40
40
|
end
|
@@ -33,7 +33,7 @@ Building a better future, one line of code at a time.
|
|
33
33
|
class CreateLesliBabelBuckets < ActiveRecord::Migration[7.0]
|
34
34
|
def change
|
35
35
|
create_table :lesli_babel_buckets do |t|
|
36
|
-
t.string :
|
36
|
+
t.string :code
|
37
37
|
t.string :reference_module
|
38
38
|
t.datetime :deleted_at
|
39
39
|
t.timestamps
|
data/lib/lesli_babel/version.rb
CHANGED
@@ -30,8 +30,8 @@ Building a better future, one line of code at a time.
|
|
30
30
|
// ·
|
31
31
|
=end
|
32
32
|
|
33
|
+
# ·
|
33
34
|
require "json"
|
34
|
-
|
35
35
|
namespace :lesli_babel do
|
36
36
|
|
37
37
|
desc "Delete translations files"
|
@@ -45,7 +45,7 @@ namespace :lesli_babel do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
desc "Create standard structure for translations according to the objects in the app"
|
48
|
-
task
|
48
|
+
task build: [:environment] do
|
49
49
|
|
50
50
|
engines = Lesli::SystemController.index(matrix: false)
|
51
51
|
|
@@ -53,11 +53,12 @@ namespace :lesli_babel do
|
|
53
53
|
|
54
54
|
platform = "lesli_engine"
|
55
55
|
platform = "lesli_core" if t[:engine] == "lesli"
|
56
|
+
platform = "rails_app" if t[:engine] == "app"
|
56
57
|
|
57
58
|
# add object to the translation workflow
|
58
|
-
translation_module = LesliBabel::Module.find_or_create_by(
|
59
|
-
translation_bucket = LesliBabel::Bucket.find_or_create_by(
|
60
|
-
translation_bucket = LesliBabel::Bucket.find_or_create_by(
|
59
|
+
translation_module = LesliBabel::Module.find_or_create_by(code: t[:engine], platform: platform)
|
60
|
+
translation_bucket = LesliBabel::Bucket.find_or_create_by(code: t[:route].sub(t[:engine]+"/", ""), module: translation_module, reference_module: translation_module.code)
|
61
|
+
translation_bucket = LesliBabel::Bucket.find_or_create_by(code: "shared", module: translation_module, reference_module: translation_module.code)
|
61
62
|
|
62
63
|
end
|
63
64
|
|
@@ -65,57 +66,38 @@ namespace :lesli_babel do
|
|
65
66
|
|
66
67
|
end
|
67
68
|
|
68
|
-
desc "Scan for descriptors and register labels for translations for them"
|
69
|
-
task descriptors: [:environment] do
|
70
|
-
|
71
|
-
puts "scan for descriptors"
|
72
|
-
|
73
|
-
translation_module = CloudBabel::Module.find_or_create_by({ name: "Core", platform: "rails_core" })
|
74
|
-
translation_bucket = CloudBabel::Bucket.find_or_create_by({
|
75
|
-
name: "descriptors",
|
76
|
-
module: translation_module,
|
77
|
-
reference_module: translation_module.name
|
78
|
-
})
|
79
|
-
|
80
|
-
Descriptor.all.each do |descriptor|
|
81
|
-
CloudBabel::String.find_or_create_by({
|
82
|
-
:label => "descriptor_#{descriptor["name"]}",
|
83
|
-
:bucket => translation_bucket
|
84
|
-
})
|
85
|
-
end
|
86
|
-
|
87
|
-
|
88
|
-
end
|
89
|
-
|
90
|
-
def scan_for_engines
|
91
|
-
controller_list = {}
|
92
|
-
|
93
|
-
Rails.application.routes.routes.each do |route|
|
94
|
-
route = route.defaults
|
95
|
-
|
96
|
-
next if route[:controller].blank?
|
97
|
-
next if route[:controller].include? "rails"
|
98
|
-
next if route[:controller].include? "action_mailbox"
|
99
|
-
next if route[:controller].include? "active_storage"
|
100
|
-
|
101
|
-
controller_list[route[:controller]] = [] unless controller_list[route[:controller]]
|
102
|
-
|
103
|
-
controller_list[route[:controller]].push(route[:action])
|
104
|
-
end
|
105
69
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
70
|
+
desc "Export translations to json files"
|
71
|
+
task :export => :environment do |task, args|
|
72
|
+
|
73
|
+
Lesli::System.engines.each do |engine, engine_info|
|
74
|
+
# You can provide the config directly using the following
|
75
|
+
config = {
|
76
|
+
"translations"=> [
|
77
|
+
{
|
78
|
+
"file"=>"engines/#{engine}/lib/vue/stores/translations.json",
|
79
|
+
"patterns"=>[
|
80
|
+
"*.#{engine_info[:code]}",
|
81
|
+
"*.lesli.*",
|
82
|
+
"!*.date",
|
83
|
+
"!*.devise",
|
84
|
+
"!*.faker",
|
85
|
+
"!*.flash",
|
86
|
+
"!*.helpers",
|
87
|
+
"!*.number",
|
88
|
+
"!*.views",
|
89
|
+
"!*.time",
|
90
|
+
"!*.support",
|
91
|
+
"!*.i18n",
|
92
|
+
"!*.activerecord",
|
93
|
+
"!*.errors",
|
94
|
+
"!*.number.nth"
|
95
|
+
]
|
96
|
+
}
|
97
|
+
]
|
98
|
+
}
|
99
|
+
|
100
|
+
pp I18nJS.call(config: config)
|
117
101
|
end
|
118
|
-
|
119
|
-
return controller_list
|
120
|
-
end
|
102
|
+
end
|
121
103
|
end
|
data/lib/vue/application.js
CHANGED
@@ -1,17 +1,31 @@
|
|
1
1
|
/*
|
2
|
-
|
2
|
+
Lesli
|
3
3
|
|
4
|
-
|
5
|
-
industrial property, intellectual property, copyright and relative international laws.
|
6
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
7
|
-
pictures and any other information belongs to the owner of this platform.
|
4
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
8
5
|
|
9
|
-
|
10
|
-
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
7
|
+
it under the terms of the GNU General Public License as published by
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
9
|
+
(at your option) any later version.
|
11
10
|
|
12
|
-
|
11
|
+
This program is distributed in the hope that it will be useful,
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
GNU General Public License for more details.
|
13
15
|
|
14
|
-
|
16
|
+
You should have received a copy of the GNU General Public License
|
17
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
18
|
+
|
19
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
20
|
+
|
21
|
+
Made with ♥ by https://www.lesli.tech
|
22
|
+
Building a better future, one line of code at a time.
|
23
|
+
|
24
|
+
@contact hello@lesli.tech
|
25
|
+
@website https://www.lesli.tech
|
26
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
27
|
+
|
28
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
15
29
|
// ·
|
16
30
|
*/
|
17
31
|
|
@@ -1,18 +1,32 @@
|
|
1
1
|
<script setup>
|
2
2
|
/*
|
3
|
-
|
3
|
+
Lesli
|
4
4
|
|
5
|
-
|
6
|
-
industrial property, intellectual property, copyright and relative international laws.
|
7
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
8
|
-
pictures and any other information belongs to the owner of this platform.
|
5
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
9
6
|
|
10
|
-
|
11
|
-
|
7
|
+
This program is free software: you can redistribute it and/or modify
|
8
|
+
it under the terms of the GNU General Public License as published by
|
9
|
+
the Free Software Foundation, either version 3 of the License, or
|
10
|
+
(at your option) any later version.
|
12
11
|
|
13
|
-
|
12
|
+
This program is distributed in the hope that it will be useful,
|
13
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
GNU General Public License for more details.
|
14
16
|
|
15
|
-
|
17
|
+
You should have received a copy of the GNU General Public License
|
18
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
|
+
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
|
+
|
22
|
+
Made with ♥ by https://www.lesli.tech
|
23
|
+
Building a better future, one line of code at a time.
|
24
|
+
|
25
|
+
@contact hello@lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
16
30
|
// ·
|
17
31
|
*/
|
18
32
|
|
@@ -65,8 +79,8 @@ watch(() => route.params.id, () => {
|
|
65
79
|
|
66
80
|
</script>
|
67
81
|
<template>
|
68
|
-
<
|
69
|
-
<lesli-header :title="storeModule.
|
82
|
+
<lesli-application-container>
|
83
|
+
<lesli-header :title="storeModule.code">
|
70
84
|
<component-actions></component-actions>
|
71
85
|
<lesli-button solid icon="add" @click="storeStrings.showPanel = true">
|
72
86
|
add new string
|
@@ -81,11 +95,6 @@ watch(() => route.params.id, () => {
|
|
81
95
|
|
82
96
|
<lesli-panel v-model:open="storeStrings.showPanel">
|
83
97
|
<template #header>
|
84
|
-
<span class="icon">
|
85
|
-
<span class="material-icons">
|
86
|
-
translate
|
87
|
-
</span>
|
88
|
-
</span>
|
89
98
|
Add new string to translate
|
90
99
|
</template>
|
91
100
|
<template #default>
|
@@ -93,5 +102,5 @@ watch(() => route.params.id, () => {
|
|
93
102
|
</formStringNew>
|
94
103
|
</template>
|
95
104
|
</lesli-panel>
|
96
|
-
</
|
105
|
+
</lesli-application-container>
|
97
106
|
</template>
|
@@ -1,18 +1,33 @@
|
|
1
1
|
<script setup>
|
2
2
|
/*
|
3
|
-
Copyright (c) 2022, all rights reserved.
|
4
3
|
|
5
|
-
|
6
|
-
industrial property, intellectual property, copyright and relative international laws.
|
7
|
-
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
8
|
-
pictures and any other information belongs to the owner of this platform.
|
4
|
+
Lesli
|
9
5
|
|
10
|
-
|
11
|
-
transmission, publication is strictly forbidden.
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
12
7
|
|
13
|
-
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
9
|
+
it under the terms of the GNU General Public License as published by
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
11
|
+
(at your option) any later version.
|
14
12
|
|
15
|
-
|
13
|
+
This program is distributed in the hope that it will be useful,
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
GNU General Public License for more details.
|
17
|
+
|
18
|
+
You should have received a copy of the GNU General Public License
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
20
|
+
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
22
|
+
|
23
|
+
Made with ♥ by https://www.lesli.tech
|
24
|
+
Building a better future, one line of code at a time.
|
25
|
+
|
26
|
+
@contact hello@lesli.tech
|
27
|
+
@website https://www.lesli.tech
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
+
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
16
31
|
// ·
|
17
32
|
*/
|
18
33
|
|
@@ -54,80 +69,53 @@ const string = ref('')
|
|
54
69
|
|
55
70
|
// ·
|
56
71
|
const prefixes = [{
|
57
|
-
label: 'account_init',
|
58
|
-
value: 'account_init'
|
59
|
-
}, {
|
60
|
-
label: 'activity_description',
|
61
|
-
value: 'activity_description'
|
62
|
-
}, {
|
63
72
|
label: "column",
|
64
73
|
value: "column"
|
65
74
|
}, {
|
66
|
-
label: "
|
67
|
-
value: "
|
68
|
-
}, {
|
69
|
-
label: "mailer",
|
70
|
-
value: "mailer"
|
71
|
-
}, {
|
72
|
-
label: "messages_success",
|
73
|
-
value: "messages_success"
|
74
|
-
}, {
|
75
|
-
label: "messages_info",
|
76
|
-
value: "messages_info"
|
77
|
-
}, {
|
78
|
-
label: "messages_warning",
|
79
|
-
value: "messages_warning"
|
80
|
-
}, {
|
81
|
-
label: "messages_danger",
|
82
|
-
value: "messages_danger"
|
75
|
+
label: "message",
|
76
|
+
value: "message"
|
83
77
|
}, {
|
84
|
-
label: "
|
85
|
-
value: "
|
78
|
+
label: "navigation",
|
79
|
+
value: "navigation"
|
86
80
|
}, {
|
87
81
|
label: "error",
|
88
82
|
value: "error"
|
89
83
|
}, {
|
90
|
-
label: "
|
91
|
-
value: "
|
84
|
+
label: "button",
|
85
|
+
value: "button"
|
92
86
|
}, {
|
93
|
-
label: "
|
94
|
-
value: "
|
87
|
+
label: "chart",
|
88
|
+
value: "chart"
|
95
89
|
}, {
|
96
|
-
label: "
|
97
|
-
value: "
|
90
|
+
label: "tab_title",
|
91
|
+
value: "tab_title"
|
98
92
|
}, {
|
99
|
-
label: "
|
100
|
-
value: "
|
93
|
+
label: "table_action",
|
94
|
+
value: "table_action"
|
95
|
+
}, {
|
96
|
+
label: "table_header",
|
97
|
+
value: "table_header"
|
101
98
|
}, {
|
102
|
-
label: "
|
103
|
-
value: "
|
99
|
+
label: "title",
|
100
|
+
value: "title"
|
104
101
|
}, {
|
105
|
-
label: "
|
106
|
-
value: "
|
102
|
+
label: "toolbar",
|
103
|
+
value: "toolbar"
|
107
104
|
}, {
|
108
|
-
label: "
|
109
|
-
value: "
|
105
|
+
label: "view",
|
106
|
+
value: "view"
|
110
107
|
}, {
|
111
108
|
label: "view_text",
|
112
109
|
value: "view_text"
|
113
110
|
}, {
|
114
|
-
label: "
|
115
|
-
value: "
|
116
|
-
}, {
|
117
|
-
label: "view_toolbar_filter",
|
118
|
-
value: "view_toolbar_filter"
|
119
|
-
}, {
|
120
|
-
label: "view_toolbar_filter_placeholder",
|
121
|
-
value: "view_toolbar_filter_placeholder"
|
122
|
-
}, {
|
123
|
-
label: "view_toolbar_search_by_placeholder",
|
124
|
-
value: "view_toolbar_search_by_placeholder"
|
111
|
+
label: "view_placeholder",
|
112
|
+
value: "view_placeholder"
|
125
113
|
}]
|
126
114
|
|
127
115
|
|
128
116
|
function postString() {
|
129
117
|
storeString.post({
|
130
|
-
|
118
|
+
bucket_id: bucket.value,
|
131
119
|
context: '',
|
132
120
|
label: prefix.value + "_" + string.value
|
133
121
|
})
|
@@ -137,14 +125,14 @@ function postString() {
|
|
137
125
|
|
138
126
|
</script>
|
139
127
|
<template>
|
140
|
-
<form
|
128
|
+
<lesli-form @submit="postString">
|
141
129
|
<div class="card-content">
|
142
130
|
<div class="field">
|
143
131
|
<label class="label">Bucket</label>
|
144
132
|
<div class="control">
|
145
133
|
<lesli-select
|
146
134
|
v-model="bucket"
|
147
|
-
:options="storeModule.buckets.map(b => { return { value: b.id, label: b.
|
135
|
+
:options="storeModule.buckets.map(b => { return { value: b.id, label: b.code }})">
|
148
136
|
</lesli-select>
|
149
137
|
</div>
|
150
138
|
</div>
|
@@ -167,5 +155,5 @@ function postString() {
|
|
167
155
|
<input class="button is-primary" type="submit" value="Save" />
|
168
156
|
</div>
|
169
157
|
</div>
|
170
|
-
</form>
|
158
|
+
</lesli-form>
|
171
159
|
</template>
|