decidim-voca 0.0.6 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.md +161 -161
- data/README.md +42 -133
- data/Rakefile +46 -39
- data/app/cells/decidim/footer_topics/show_overrides.erb +8 -0
- data/app/cells/decidim/meetings/dates_and_map/show_overrides.erb +23 -0
- data/app/commands/decidim/voca/admin/code_census/save_code_list.rb +34 -0
- data/app/commands/decidim/voca/code_census/confirm_code_authorization.rb +16 -0
- data/app/commands/decidim/voca/create_editor_file.rb +36 -0
- data/app/commands/decidim/voca/rack_attack_configurator.rb +244 -0
- data/app/commands/decidim/voca/sync_redis_routing.rb +120 -0
- data/app/commands/decidim/voca/user_fields_configurator.rb +40 -0
- data/app/controllers/decidim/voca/admin/application_controller.rb +4 -6
- data/app/controllers/decidim/voca/admin/code_census/code_lists_controller.rb +40 -0
- data/app/controllers/decidim/voca/application_controller.rb +4 -6
- data/app/controllers/decidim/voca/code_census/authorizations_controller.rb +53 -0
- data/app/controllers/decidim/voca/editor_files_controller.rb +47 -0
- data/app/controllers/decidim/voca/geolocation_controller.rb +32 -0
- data/app/forms/decidim/voca/admin/code_census/code_list_form.rb +21 -0
- data/app/forms/decidim/voca/admin/organization_config_form.rb +24 -0
- data/app/forms/decidim/voca/code_census/code_form.rb +41 -0
- data/app/forms/decidim/voca/editor_file_form.rb +18 -0
- data/app/jobs/decidim/voca/machine_translate_awesome_menu_label_job.rb +63 -0
- data/app/jobs/decidim/voca/machine_translate_component_setting_job.rb +58 -0
- data/app/jobs/decidim/voca/machine_translate_content_block_setting_job.rb +85 -0
- data/app/models/decidim/voca/conversation_uuid.rb +18 -0
- data/app/models/decidim/voca/editor_file.rb +18 -0
- data/app/models/decidim/voca/validation_code.rb +13 -0
- data/app/overrides/admin_add_machine_translation_flag.rb +40 -0
- data/app/overrides/insert_assets.rb +26 -0
- data/app/overrides/insert_weglot_scripts.rb +60 -0
- data/app/overrides/proposal_camera.rb +18 -0
- data/app/overrides/show_votes.rb +27 -0
- data/app/overrides/voca_footer.rb +52 -0
- data/app/packs/entrypoints/admin-decidim-voca.js +2 -0
- data/app/packs/entrypoints/admin-decidim-voca.scss +1 -0
- data/app/packs/entrypoints/decidim-voca-fixes.scss +1 -0
- data/app/packs/entrypoints/decidim-voca.js +1 -0
- data/app/packs/entrypoints/decidim-voca.scss +1 -0
- data/app/packs/images/voca-logo-primary-x3.png +0 -0
- data/app/packs/src/decidim/direct_uploads/upload_field.js +150 -0
- data/app/packs/src/decidim/voca/admin/voca.js +16 -0
- data/app/packs/src/decidim/voca/proposal_better_ux/use_camera_button.js +39 -0
- data/app/packs/src/decidim/voca/proposal_better_ux/utils/get_current_position.js +21 -0
- data/app/packs/src/decidim/voca/proposal_better_ux/utils/get_proposal_form.js +13 -0
- data/app/packs/src/decidim/voca/proposal_better_ux/utils/loading.js +23 -0
- data/app/packs/src/decidim/voca/proposal_better_ux/utils/locate_coordinates.js +23 -0
- data/app/packs/src/decidim/voca/proposal_custom_fields/custom_field_renderer_override.js +152 -0
- data/app/packs/src/decidim/voca/proposal_custom_fields/editor_budget_field.js +329 -0
- data/app/packs/src/decidim/voca/proposal_custom_fields/editor_upload_field.js +85 -0
- data/app/packs/src/decidim/voca/proposal_custom_fields/proposal_custom_fields.js +96 -0
- data/app/packs/src/decidim/voca/proposal_custom_fields/render_budget_field.js +76 -0
- data/app/packs/src/decidim/voca/proposal_fields/render_budget_field.js +76 -0
- data/app/packs/src/decidim/voca/questionnaire/scroll_questionnaire_steps_to_top.js +18 -0
- data/app/packs/src/decidim/voca/voca.js +4 -0
- data/app/packs/src/decidim/voca/weglot/index.js +13 -0
- data/app/packs/src/decidim/voca/weglot/start_weglot.js +112 -0
- data/app/packs/src/decidim/voca/weglot/switcher.js +92 -0
- data/app/packs/src/decidim/voca/weglot/wait_for_weglot.js +10 -0
- data/app/packs/stylesheets/decidim/voca/_custom_proposal_fields.scss +111 -0
- data/app/packs/stylesheets/decidim/voca/_decidim_voca.scss +5 -0
- data/app/packs/stylesheets/decidim/voca/_decidim_voca_fixes.scss +25 -0
- data/app/packs/stylesheets/decidim/voca/_primary_footer.scss +77 -0
- data/app/packs/stylesheets/decidim/voca/_proposal_camera.scss +14 -0
- data/app/packs/stylesheets/decidim/voca/_weglot.scss +61 -0
- data/app/packs/stylesheets/decidim/voca/admin/_decidim_voca.scss +5 -0
- data/app/packs/stylesheets/decidim/voca/admin/_full_machine_translation.scss +34 -0
- data/app/permissions/decidim/voca/admin/permissions.rb +31 -0
- data/app/permissions/decidim/voca/permissions.rb +17 -0
- data/app/views/decidim/voca/admin/code_census/authorizations/new.html.erb +33 -0
- data/app/views/decidim/voca/admin/code_census/code_lists/edit.html.erb +27 -0
- data/app/views/decidim/voca/code_census/authorizations/new.html.erb +24 -0
- data/app/views/decidim/voca/deepl/overrides/_admin_machine_translation_alert.html.erb +14 -0
- data/app/views/decidim/voca/rack_attack/_blocked.html.erb +151 -0
- data/app/views/decidim/voca/weglot/_js_configuration.html.erb +14 -0
- data/app/views/decidim/voca/weglot/_locale_switcher.html.erb +14 -0
- data/app/views/decidim/voca/weglot/_locale_switcher_mobile.erb +14 -0
- data/app/views/decidim/voca/weglot/_topbar_locale_switcher.html.erb +14 -0
- data/config/assets.rb +12 -0
- data/config/i18n-tasks.yml +14 -5
- data/config/locales/cs.yml +94 -0
- data/config/locales/custom_fields.cs.yml +30 -0
- data/config/locales/custom_fields.en.yml +41 -0
- data/config/locales/custom_fields.fr.yml +30 -0
- data/config/locales/custom_fields.it.yml +30 -0
- data/config/locales/en.yml +97 -4
- data/config/locales/fr.yml +102 -0
- data/config/locales/it.yml +94 -0
- data/lib/decidim/voca/awesome_menu_label_machine_translation.rb +73 -0
- data/lib/decidim/voca/awesome_menu_labels.rb +28 -0
- data/lib/decidim/voca/code_census/admin_engine.rb +22 -0
- data/lib/decidim/voca/code_census/engine.rb +29 -0
- data/lib/decidim/voca/code_census/workflow.rb +7 -0
- data/lib/decidim/voca/code_census.rb +4 -0
- data/lib/decidim/voca/component_setting_manifest.rb +27 -0
- data/lib/decidim/voca/component_setting_pending_locales.rb +33 -0
- data/lib/decidim/voca/component_translated_settings_machine_translation.rb +86 -0
- data/lib/decidim/voca/configuration.rb +23 -0
- data/lib/decidim/voca/content_block_setting_manifest.rb +67 -0
- data/lib/decidim/voca/content_block_translated_settings_machine_translation.rb +100 -0
- data/lib/decidim/voca/deepl/deepl_active_job_context.rb +27 -0
- data/lib/decidim/voca/deepl/deepl_context.rb +78 -0
- data/lib/decidim/voca/deepl/deepl_form_builder_overrides.rb +82 -0
- data/lib/decidim/voca/deepl/deepl_machine_translator.rb +61 -0
- data/lib/decidim/voca/deepl/deepl_middleware.rb +83 -0
- data/lib/decidim/voca/deepl/engine_config.rb +181 -0
- data/lib/decidim/voca/deepl/settings.rb +75 -0
- data/lib/decidim/voca/deepl/translation_bar_overrides.rb +20 -0
- data/lib/decidim/voca/deepl.rb +10 -0
- data/lib/decidim/voca/engine.rb +320 -11
- data/lib/decidim/voca/export/comment_serializer_localized_csv.rb +34 -0
- data/lib/decidim/voca/export/csv_with_locale_transformer.rb +53 -0
- data/lib/decidim/voca/export/proposal_serializer_localized_csv.rb +45 -0
- data/lib/decidim/voca/export/user_answers_serializer_localized_csv.rb +54 -0
- data/lib/decidim/voca/installation.rb +33 -0
- data/lib/decidim/voca/machine_translation/translate_string.rb +121 -0
- data/lib/decidim/voca/machine_translation_human_source.rb +29 -0
- data/lib/decidim/voca/machine_translation_resource_job_voca.rb +65 -0
- data/lib/decidim/voca/organization_voca_extensions.rb +31 -0
- data/lib/decidim/voca/overrides/csv_export_serializers.rb +51 -0
- data/lib/decidim/voca/overrides/meetings/dates_and_map_cell_overrides.rb +20 -0
- data/lib/decidim/voca/overrides/menu_breadcrumb_last_activity_cache.rb +31 -0
- data/lib/decidim/voca/overrides/mod_secure/conversation_controller_overrides.rb +19 -0
- data/lib/decidim/voca/overrides/mod_secure/conversation_sanitize.rb +29 -0
- data/lib/decidim/voca/overrides/mod_secure/conversation_uuid.rb +34 -0
- data/lib/decidim/voca/overrides/mod_secure/user_conversations_redirect_overrides.rb +53 -0
- data/lib/decidim/voca/overrides/mod_secure/user_profile_verification_override.rb +31 -0
- data/lib/decidim/voca/overrides/newsletter_helper_overrides.rb +30 -0
- data/lib/decidim/voca/overrides/resource_presenter_overrides.rb +30 -0
- data/lib/decidim/voca/overrides/sanitize_helper_overrides.rb +39 -0
- data/lib/decidim/voca/sync_locales/README.md +13 -0
- data/lib/decidim/voca/sync_locales/awesome_menu_label_sync.rb +89 -0
- data/lib/decidim/voca/sync_locales/command.rb +54 -0
- data/lib/decidim/voca/sync_locales/component_setting_sync.rb +72 -0
- data/lib/decidim/voca/sync_locales/content_block_setting_sync.rb +86 -0
- data/lib/decidim/voca/sync_locales/field_hash_normalizer.rb +98 -0
- data/lib/decidim/voca/sync_locales/locale_context.rb +589 -0
- data/lib/decidim/voca/sync_locales/machine_translation_enqueuer.rb +60 -0
- data/lib/decidim/voca/sync_locales/relation_lint_runner.rb +55 -0
- data/lib/decidim/voca/sync_locales/runner.rb +352 -0
- data/lib/decidim/voca/sync_locales.rb +11 -0
- data/lib/decidim/voca/update_column_without_callbacks.rb +21 -0
- data/lib/decidim/voca/version.rb +13 -3
- data/lib/decidim/voca.rb +40 -14
- data/lib/decidim-voca.rb +5 -0
- data/lib/tasks/decidim/voca/voca_anonymize.rake +41 -0
- data/lib/tasks/decidim/voca/voca_clean_machine_translations.rake +22 -0
- data/lib/tasks/decidim/voca/voca_enhanced_invalid_record.rake +141 -0
- data/lib/tasks/decidim/voca/voca_install_migration.rake +45 -0
- data/lib/tasks/decidim/voca/voca_relation_lint.rake +12 -0
- data/lib/tasks/decidim/voca/voca_sync_locales.rake +10 -0
- data/lib/tasks/decidim/voca/voca_upgrade.rake +13 -0
- data/lib/tasks/decidim/voca/voca_webpacker.rake +58 -0
- metadata +247 -55
- data/app/assets/config/voca_manifest.js +0 -0
- data/app/assets/images/decidim/voca/icon.svg +0 -1
- data/app/commands/decidim/voca/organization/command.rb +0 -16
- data/app/commands/decidim/voca/organization/organization_command.rb +0 -17
- data/app/commands/decidim/voca/organization/update_color_command.rb +0 -35
- data/app/commands/decidim/voca/organization/update_environment_command.rb +0 -23
- data/app/commands/decidim/voca/organization/update_feature_command.rb +0 -32
- data/app/commands/decidim/voca/organization/update_file_upload_command.rb +0 -45
- data/app/commands/decidim/voca/organization/update_locale_command.rb +0 -53
- data/app/commands/decidim/voca/organization/update_naming_command.rb +0 -30
- data/app/commands/decidim/voca/organization/update_permission_command.rb +0 -31
- data/app/commands/decidim/voca/organization/update_smtp_command.rb +0 -51
- data/app/jobs/decidim/voca/command_job.rb +0 -36
- data/app/jobs/decidim/voca/webhook_notifier_job.rb +0 -57
- data/app/rpc/decidim/voca/decidim_service_controller.rb +0 -68
- data/app/rpc/decidim/voca/rpc/enum_casting.rb +0 -58
- data/app/rpc/decidim/voca/rpc/get_settings.rb +0 -144
- data/app/rpc/decidim/voca/rpc/health.rb +0 -18
- data/app/rpc/decidim/voca/rpc/seed_admin.rb +0 -75
- data/app/rpc/decidim/voca/rpc/set_settings.rb +0 -56
- data/app/rpc/decidim/voca/rpc/setup_db.rb +0 -38
- data/config/environments/development.rb +0 -6
- data/config/spring.rb +0 -2
- data/lib/decidim/voca/admin.rb +0 -10
- data/lib/decidim/voca/admin_engine.rb +0 -27
- data/lib/decidim/voca/backup/app_backup.rb +0 -169
- data/lib/decidim/voca/backup/app_decrypt_backup_file.rb +0 -50
- data/lib/decidim/voca/backup/app_encrypt_backup_file.rb +0 -49
- data/lib/decidim/voca/backup/app_upload_to_s3.rb +0 -49
- data/lib/decidim/voca/middleware/dynamic_config_middleware.rb +0 -42
- data/lib/decidim/voca/rpc/decidim_pb.rb +0 -134
- data/lib/decidim/voca/rpc/decidim_services_pb.rb +0 -30
- data/lib/decidim/voca/test/factories.rb +0 -9
- data/lib/decidim/voca/updater.rb +0 -50
- data/lib/tasks/voca.rake +0 -88
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<%# Minimalistic DeepL: warn when admin UI locale is not the organization default. %>
|
|
2
|
+
<% if current_organization.minimalistic_deepl? && current_organization.enable_machine_translations? && current_organization.default_locale.to_s != I18n.locale.to_s %>
|
|
3
|
+
<% locale = current_organization.default_locale %>
|
|
4
|
+
<div class="voca__machine_translation_alert">
|
|
5
|
+
<div class="voca__machine_translation_alert__content">
|
|
6
|
+
<h2 class="h2"><%= t("decidim.voca.admin.machine_translation_alert.title", current_locale: I18n.locale, default_locale: current_organization.default_locale) %></h2>
|
|
7
|
+
<p class="prose text-lg">
|
|
8
|
+
<%= t("decidim.voca.admin.machine_translation_alert.description_html", current_locale: I18n.locale, default_locale: current_organization.default_locale) %>
|
|
9
|
+
<%= link_to t("decidim.voca.admin.machine_translation_alert.button"), decidim.locale_path(locale:), method: :post, lang: locale, class: "button button__sm button__secondary" %>
|
|
10
|
+
</p>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<html lang="<%= I18n.locale %>">
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="utf-8" />
|
|
4
|
+
<title><%= t("decidim.voca.rack_attack.blocked.title") %></title>
|
|
5
|
+
<meta name="robots" content="noindex, nofollow" />
|
|
6
|
+
<meta
|
|
7
|
+
name="viewport"
|
|
8
|
+
content="initial-scale=1, minimum-scale=1, width=device-width"
|
|
9
|
+
/>
|
|
10
|
+
<style data-emotion="css-global" data-s="">
|
|
11
|
+
html {
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
-webkit-text-size-adjust: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
*,
|
|
19
|
+
*::before,
|
|
20
|
+
*::after {
|
|
21
|
+
box-sizing: inherit;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
strong,
|
|
25
|
+
b {
|
|
26
|
+
font-weight: 700;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
body {
|
|
30
|
+
margin: 0;
|
|
31
|
+
color: rgba(0, 0, 0, 0.87);
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
font-size: 1rem;
|
|
34
|
+
line-height: 1.5;
|
|
35
|
+
background-color: #eeeeee;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media print {
|
|
39
|
+
body {
|
|
40
|
+
background-color: #fff;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
body::backdrop {
|
|
45
|
+
background-color: #eeeeee;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
h2 {
|
|
49
|
+
margin: 32px 0px;
|
|
50
|
+
font-size: 26px;
|
|
51
|
+
font-weight: bold;
|
|
52
|
+
line-height: 1.2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
h6 {
|
|
56
|
+
margin: 0px;
|
|
57
|
+
font-size: 0.875rem;
|
|
58
|
+
font-weight: bold;
|
|
59
|
+
line-height: 1.6;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#Root {
|
|
63
|
+
text-align: center;
|
|
64
|
+
width: 25%;
|
|
65
|
+
margin: 0 auto;
|
|
66
|
+
min-height: 100vh;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
font-family: 'Inter', sans-serif;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.support {
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
-webkit-box-align: center;
|
|
76
|
+
align-items: center;
|
|
77
|
+
-webkit-box-pack: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
box-sizing: border-box;
|
|
80
|
+
-webkit-tap-highlight-color: transparent;
|
|
81
|
+
outline: 0px;
|
|
82
|
+
border: 0px;
|
|
83
|
+
margin: 0px;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
user-select: none;
|
|
86
|
+
vertical-align: middle;
|
|
87
|
+
appearance: none;
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
font-size: 0.875rem;
|
|
91
|
+
line-height: 1.75;
|
|
92
|
+
min-height: auto;
|
|
93
|
+
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
94
|
+
box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
95
|
+
border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
96
|
+
border-radius: 20px;
|
|
97
|
+
padding: 0px 16px;
|
|
98
|
+
min-width: 40px;
|
|
99
|
+
width: auto;
|
|
100
|
+
height: 40px;
|
|
101
|
+
box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 5px -1px,
|
|
102
|
+
rgba(0, 0, 0, 0.14) 0px 6px 10px 0px,
|
|
103
|
+
rgba(0, 0, 0, 0.12) 0px 1px 18px 0px;
|
|
104
|
+
color: rgb(255, 255, 255);
|
|
105
|
+
background-color: rgb(37, 53, 80);
|
|
106
|
+
position: fixed;
|
|
107
|
+
right: 16px;
|
|
108
|
+
bottom: 16px;
|
|
109
|
+
text-transform: initial;
|
|
110
|
+
z-index: 1301;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.logo {
|
|
114
|
+
width: 240px;
|
|
115
|
+
aspect-ratio: auto 240 / 60;
|
|
116
|
+
height: 60px;
|
|
117
|
+
}
|
|
118
|
+
</style>
|
|
119
|
+
</head>
|
|
120
|
+
|
|
121
|
+
<body>
|
|
122
|
+
<div id="Root">
|
|
123
|
+
<div>
|
|
124
|
+
<div>
|
|
125
|
+
<div>
|
|
126
|
+
<img
|
|
127
|
+
alt="Voca.city"
|
|
128
|
+
fetchpriority="high"
|
|
129
|
+
width="240"
|
|
130
|
+
height="60"
|
|
131
|
+
decoding="async"
|
|
132
|
+
data-nimg="1"
|
|
133
|
+
class="logo"
|
|
134
|
+
src="https://app.voca.city/logo.png"
|
|
135
|
+
style="color: transparent"
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
<h2><%= t("decidim.voca.rack_attack.blocked.title") %></h2>
|
|
140
|
+
<h6><%= t("decidim.voca.rack_attack.blocked.subtitle") %></h6>
|
|
141
|
+
<p><%= t("decidim.voca.rack_attack.blocked.description") %></p>
|
|
142
|
+
<a
|
|
143
|
+
class="support"
|
|
144
|
+
tabindex="0"
|
|
145
|
+
aria-label="Need support ?"
|
|
146
|
+
href="mailto:support@octree.ch"
|
|
147
|
+
>Need support ?</a>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</body>
|
|
151
|
+
</html>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% if current_organization.weglot? %>
|
|
2
|
+
<%
|
|
3
|
+
weglot_js_config = {
|
|
4
|
+
enabled: current_organization.weglot?,
|
|
5
|
+
api_key: Decidim::Voca.configuration.weglot_api_key,
|
|
6
|
+
default_language: current_organization.default_locale,
|
|
7
|
+
enable_cache: current_organization.weglot_cache?
|
|
8
|
+
}
|
|
9
|
+
%>
|
|
10
|
+
<script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js"></script>
|
|
11
|
+
<script type="text/javascript">
|
|
12
|
+
window.VocaWeglotConfig = <%= weglot_js_config.to_json.html_safe %>;
|
|
13
|
+
</script>
|
|
14
|
+
<% end %>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% if current_organization.weglot? %>
|
|
2
|
+
<% switcher_id ||= "1" %>
|
|
3
|
+
<div class="main-footer__language-container vocajs_weglot__locale_switcher" data-weglot-active="<%= current_organization.weglot? %>">
|
|
4
|
+
<button id="trigger-dropdown-language-chooser-<%= switcher_id %>" data-controller="dropdown" data-target="dropdown-menu-language-chooser-<%= switcher_id %>" class="main-footer__language-trigger">
|
|
5
|
+
<%= icon "global-line" %>
|
|
6
|
+
<span class="vocajs_weglot__locale_current"></span>
|
|
7
|
+
<%= icon "arrow-down-s-line" %>
|
|
8
|
+
</button>
|
|
9
|
+
<div id="dropdown-menu-language-chooser-<%= switcher_id %>" class="vocajs_weglot__locale_dropdown" aria-hidden="true">
|
|
10
|
+
<ul class="main-footer__language" role="menu" data-weglot-item-class="text-black text-md" data-weglot-textitem-class="p-2 w-full block hover:bg-secondary hover:text-white transition">
|
|
11
|
+
</ul>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<% end %>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% if current_organization.weglot? %>
|
|
2
|
+
<% switcher_id ||= "topbar" %>
|
|
3
|
+
<div class="vocajs_weglot__locale_switcher" data-weglot-active="<%= current_organization.weglot? %>">
|
|
4
|
+
<button id="dropdown-trigger-language-chooser-mobile" data-controller="dropdown" data-target="dropdown-menu-language-chooser-mobile-<%= switcher_id %>" class="mt-8 rounded-lg py-0 bg-gray-5 h-10 border border-gray outline outline-1 outline-transparent">
|
|
5
|
+
<span class="ml-2 vocajs_weglot__locale_current"></span>
|
|
6
|
+
<%= icon "arrow-down-s-line" %>
|
|
7
|
+
<%= icon "arrow-up-s-line" %>
|
|
8
|
+
</button>
|
|
9
|
+
<div id="dropdown-menu-language-chooser-mobile-<%= switcher_id %>" class="bg-gray-5 relative vocajs_weglot__locale_dropdown" aria-hidden="true">
|
|
10
|
+
<ul class="menu-bar__language-chooser" role="menu" data-weglot-item-class="text-black text-sm hover:bg-secondary hover:text-white transition h-10" data-weglot-textitem-class="p-2 w-full block">
|
|
11
|
+
</ul>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<% end %>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<% if current_organization.weglot? %>
|
|
2
|
+
<% switcher_id ||= "topbar" %>
|
|
3
|
+
<div class="main-main-bar__links-desktop__item vocajs_weglot__locale_switcher" data-weglot-active="<%= current_organization.weglot? %>">
|
|
4
|
+
<button id="trigger-dropdown-language-chooser-<%= switcher_id %>" data-controller="dropdown" data-target="dropdown-menu-language-chooser-<%= switcher_id %>" class="main-bar__links-desktop__item-trigger">
|
|
5
|
+
<%= icon "global-line" %>
|
|
6
|
+
<span class="vocajs_weglot__locale_current"></span>
|
|
7
|
+
<%= icon "arrow-down-s-line" %>
|
|
8
|
+
</button>
|
|
9
|
+
<div id="dropdown-menu-language-chooser-<%= switcher_id %>" class="vocajs_weglot__locale_dropdown" aria-hidden="true">
|
|
10
|
+
<ul class="main-bar__links-desktop__item-languages" role="menu" data-weglot-item-class="hover:bg-secondary hover:text-white transition" data-weglot-textitem-class="">
|
|
11
|
+
</ul>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<% end %>
|
data/config/assets.rb
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
base_path = File.expand_path("..", __dir__)
|
|
4
|
+
|
|
5
|
+
Decidim::Shakapacker.register_path("#{base_path}/app/packs", prepend: true)
|
|
6
|
+
Decidim::Shakapacker.register_entrypoints(
|
|
7
|
+
decidim_voca: "#{base_path}/app/packs/entrypoints/decidim-voca.scss",
|
|
8
|
+
decidim_voca_fixes: "#{base_path}/app/packs/entrypoints/decidim-voca-fixes.scss",
|
|
9
|
+
admin_decidim_voca: "#{base_path}/app/packs/entrypoints/admin-decidim-voca.scss",
|
|
10
|
+
admin_decidim_voca_js: "#{base_path}/app/packs/entrypoints/admin-decidim-voca.js",
|
|
11
|
+
decidim_voca_js: "#{base_path}/app/packs/entrypoints/decidim-voca.js"
|
|
12
|
+
)
|
data/config/i18n-tasks.yml
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
# i18n-tasks for voca Deface partials (English + voca locale files only).
|
|
2
|
+
# Cross-locale gaps in cs/fr/it packs are out of scope here; use Crowdin / full-app config for that.
|
|
3
|
+
# Run: ./bin/i18n-tasks missing --config config/i18n-tasks.yml
|
|
4
|
+
# https://github.com/glebm/i18n-tasks
|
|
2
5
|
base_locale: en
|
|
3
6
|
locales: [en]
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
data:
|
|
9
|
+
read:
|
|
10
|
+
- "config/locales/en.yml"
|
|
11
|
+
write:
|
|
12
|
+
- "config/locales/en.yml"
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
search:
|
|
15
|
+
paths:
|
|
16
|
+
- "app/views/decidim/voca/deface_partials"
|
|
17
|
+
relative_roots:
|
|
18
|
+
- "app/views"
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
cs:
|
|
3
|
+
decidim:
|
|
4
|
+
core:
|
|
5
|
+
actions:
|
|
6
|
+
unauthorized: "Nejste oprávněni provést tuto akci."
|
|
7
|
+
wizard_step_form:
|
|
8
|
+
wizard_aside:
|
|
9
|
+
back: "Zpět"
|
|
10
|
+
authorization_handlers:
|
|
11
|
+
code_census:
|
|
12
|
+
name: "Kód sčítání"
|
|
13
|
+
explanation: "Ověřte svou identitu pomocí přístupového kódu poskytnutého organizací."
|
|
14
|
+
application:
|
|
15
|
+
geocoding:
|
|
16
|
+
unconfigured: "Geokódování není pro tuto organizaci nakonfigurováno."
|
|
17
|
+
events:
|
|
18
|
+
proposals:
|
|
19
|
+
proposal_state_changed_for_authors:
|
|
20
|
+
email_intro: 'Návrh "%{resource_title}" změnil svůj stav na "%{state}". Odpověď si můžete přečíst na této stránce:'
|
|
21
|
+
email_outro: Toto oznámení jste obdrželi, protože jste autorem stránky "%{resource_title}".
|
|
22
|
+
email_subject: Váš návrh změnil svůj stav (%{state})
|
|
23
|
+
notification_title: Váš návrh <a href="%{resource_path}">%{resource_title}</a> změnil svůj stav na "%{state}".
|
|
24
|
+
proposals:
|
|
25
|
+
models:
|
|
26
|
+
proposal:
|
|
27
|
+
fields:
|
|
28
|
+
votes_on_going: Hlasování (probíhá)
|
|
29
|
+
voca:
|
|
30
|
+
code_census:
|
|
31
|
+
create:
|
|
32
|
+
success: "Váš přístupový kód byl vytvořen."
|
|
33
|
+
authorizations:
|
|
34
|
+
new:
|
|
35
|
+
title: Ověřit pomocí kódu sčítání
|
|
36
|
+
code: Přístupový kód
|
|
37
|
+
submit: Ověřit
|
|
38
|
+
create:
|
|
39
|
+
success: Nyní jste oprávněni.
|
|
40
|
+
error: Zadaný kód není platný.
|
|
41
|
+
admin:
|
|
42
|
+
code_census:
|
|
43
|
+
authorizations:
|
|
44
|
+
new:
|
|
45
|
+
title: Generovat autorizační kódy
|
|
46
|
+
intro: Pomocí této stránky vytvořte autorizační kódy pro vaše uživatele.
|
|
47
|
+
info: Zadejte níže údaje o uživateli. Systém vygeneruje jedinečný přístupový kód, který lze sdílet s uživatelem pro ověření.
|
|
48
|
+
example: "Příklad: Zadejte email nebo identifikátor uživatele"
|
|
49
|
+
code_lists:
|
|
50
|
+
edit:
|
|
51
|
+
title: Kód sčítání (%{count})
|
|
52
|
+
form:
|
|
53
|
+
label: Kódy
|
|
54
|
+
help: Vložte nebo napište všechny povolené kódy, jeden na řádek.
|
|
55
|
+
submit: Uložit kódy
|
|
56
|
+
update:
|
|
57
|
+
success: Kódy uloženy.
|
|
58
|
+
error: Kódy se nepodařilo uložit.
|
|
59
|
+
machine_translation_alert:
|
|
60
|
+
button: Přepínání jazyka
|
|
61
|
+
description_html: '<p>Jazyk "%{current_locale}" je plně přeložen strojově, je třeba přepnout na "%{default_locale}".</p>
|
|
62
|
+
|
|
63
|
+
'
|
|
64
|
+
title: 'Přepínání jazyka
|
|
65
|
+
|
|
66
|
+
'
|
|
67
|
+
editor_files:
|
|
68
|
+
create:
|
|
69
|
+
success: "Soubor byl úspěšně nahrán."
|
|
70
|
+
error: "Soubor se nepodařilo nahrát."
|
|
71
|
+
footer_text: Demokratický prostor pro vaši komunitu
|
|
72
|
+
proposals:
|
|
73
|
+
find_my_location: Použijte mou polohu
|
|
74
|
+
take_photo: Vyfotografujte se
|
|
75
|
+
rack_attack:
|
|
76
|
+
machine_translation_alert:
|
|
77
|
+
title: |
|
|
78
|
+
Přepínání jazyka
|
|
79
|
+
description_html: |
|
|
80
|
+
<p>Jazyk "%{current_locale}" je plně přeložen strojově, je třeba přepnout na "%{default_locale}".</p>
|
|
81
|
+
button: Přepínání jazyka
|
|
82
|
+
blocked:
|
|
83
|
+
description: Zjištěno příliš mnoho požadavků. Počkejte prosím několik minut a zkuste to znovu. Pokud potřebujete pomoc, kontaktujte podporu.
|
|
84
|
+
subtitle: Překročení limitu rychlosti
|
|
85
|
+
title: Dočasně omezený přístup
|
|
86
|
+
devise:
|
|
87
|
+
mailer:
|
|
88
|
+
confirmation_instructions:
|
|
89
|
+
instruction_html: 'Svůj e-mailový účet můžete potvrdit prostřednictvím níže uvedeného odkazu:'
|
|
90
|
+
layouts:
|
|
91
|
+
decidim:
|
|
92
|
+
footer:
|
|
93
|
+
decidim_title: Vaše platforma
|
|
94
|
+
help_title: Nápověda
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
cs:
|
|
3
|
+
decidim:
|
|
4
|
+
authorization_handlers:
|
|
5
|
+
code:
|
|
6
|
+
explanation: Shromáždění kódu pro ověření
|
|
7
|
+
name: Kód
|
|
8
|
+
firstname:
|
|
9
|
+
explanation: Shromážděte jméno pro ověření
|
|
10
|
+
name: Název
|
|
11
|
+
fullname_and_birthdate:
|
|
12
|
+
explanation: Shromážděte jméno a datum narození pro ověření (+13 let)
|
|
13
|
+
name: Jméno a datum narození
|
|
14
|
+
custom_user_fields:
|
|
15
|
+
code:
|
|
16
|
+
code:
|
|
17
|
+
bad_format: Kód musí být platný
|
|
18
|
+
label: Kód
|
|
19
|
+
firstname:
|
|
20
|
+
name:
|
|
21
|
+
bad_format: Název musí být platný název
|
|
22
|
+
label: Název
|
|
23
|
+
fullname_and_birthdate:
|
|
24
|
+
birthdate:
|
|
25
|
+
bad_not_after: Platforma je vyhrazena pro uživatele starší 13 let
|
|
26
|
+
label: Datum narození
|
|
27
|
+
first_name:
|
|
28
|
+
label: Křestní jméno
|
|
29
|
+
last_name:
|
|
30
|
+
label: Příjmení
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
en:
|
|
2
|
+
decidim:
|
|
3
|
+
custom_user_fields:
|
|
4
|
+
fullname_and_birthdate:
|
|
5
|
+
first_name:
|
|
6
|
+
label: First name
|
|
7
|
+
last_name:
|
|
8
|
+
label: Last name
|
|
9
|
+
birthdate:
|
|
10
|
+
label: Birthdate
|
|
11
|
+
bad_not_after: The platform is reserved for users over 13 years old
|
|
12
|
+
firstname:
|
|
13
|
+
name:
|
|
14
|
+
label: Name
|
|
15
|
+
bad_format: The name must be a valid name
|
|
16
|
+
code:
|
|
17
|
+
code:
|
|
18
|
+
label: Code
|
|
19
|
+
bad_format: The code must be a valid code
|
|
20
|
+
authorization_handlers:
|
|
21
|
+
fullname_and_birthdate:
|
|
22
|
+
name: Name and birthdate
|
|
23
|
+
explanation: Collect name and birthdate for verification (+13yrs)
|
|
24
|
+
firstname:
|
|
25
|
+
name: Name
|
|
26
|
+
explanation: Collect name for verification
|
|
27
|
+
code:
|
|
28
|
+
name: Code
|
|
29
|
+
explanation: Collect code for verification
|
|
30
|
+
authorization_modals:
|
|
31
|
+
content:
|
|
32
|
+
missing:
|
|
33
|
+
authorize: Complete the «%{authorization}»
|
|
34
|
+
explanation: To perform this action, you must complete the «%{authorization}»
|
|
35
|
+
verifications:
|
|
36
|
+
authorizations:
|
|
37
|
+
new:
|
|
38
|
+
authorize_with: Verify your identity with the «%{authorizer}»
|
|
39
|
+
first_login:
|
|
40
|
+
actions:
|
|
41
|
+
code_census: Verify your identity with the «%{authorizer}»
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
fr:
|
|
3
|
+
decidim:
|
|
4
|
+
authorization_handlers:
|
|
5
|
+
code:
|
|
6
|
+
explanation: Recueille le code pour vérification
|
|
7
|
+
name: Code
|
|
8
|
+
firstname:
|
|
9
|
+
explanation: Recueille le nom pour vérification
|
|
10
|
+
name: Nom
|
|
11
|
+
fullname_and_birthdate:
|
|
12
|
+
explanation: Recueille le nom et la date de naissance pour vérification (+13 ans)
|
|
13
|
+
name: Nom et date de naissance
|
|
14
|
+
custom_user_fields:
|
|
15
|
+
code:
|
|
16
|
+
code:
|
|
17
|
+
bad_format: Le code doit être un code valide
|
|
18
|
+
label: Code
|
|
19
|
+
firstname:
|
|
20
|
+
name:
|
|
21
|
+
bad_format: Le nom doit être un nom valide
|
|
22
|
+
label: Nom
|
|
23
|
+
fullname_and_birthdate:
|
|
24
|
+
birthdate:
|
|
25
|
+
bad_not_after: La plateforme est réservée aux utilisateurs de plus de 13 ans
|
|
26
|
+
label: Date de naissance
|
|
27
|
+
first_name:
|
|
28
|
+
label: Prénom
|
|
29
|
+
last_name:
|
|
30
|
+
label: Nom de famille
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
it:
|
|
3
|
+
decidim:
|
|
4
|
+
authorization_handlers:
|
|
5
|
+
code:
|
|
6
|
+
explanation: Raccogli il codice per la verifica
|
|
7
|
+
name: Codice
|
|
8
|
+
firstname:
|
|
9
|
+
explanation: Raccogli il nome per la verifica
|
|
10
|
+
name: Nome
|
|
11
|
+
fullname_and_birthdate:
|
|
12
|
+
explanation: Raccogli nome e data di nascita per la verifica (+13 anni)
|
|
13
|
+
name: Nome e data di nascita
|
|
14
|
+
custom_user_fields:
|
|
15
|
+
code:
|
|
16
|
+
code:
|
|
17
|
+
bad_format: Il codice deve essere un codice valido
|
|
18
|
+
label: Codice
|
|
19
|
+
firstname:
|
|
20
|
+
name:
|
|
21
|
+
bad_format: Il nome deve essere un nome valido
|
|
22
|
+
label: Nome
|
|
23
|
+
fullname_and_birthdate:
|
|
24
|
+
birthdate:
|
|
25
|
+
bad_not_after: La piattaforma è riservata agli utenti di età superiore ai 13 anni
|
|
26
|
+
label: Data di nascita
|
|
27
|
+
first_name:
|
|
28
|
+
label: Nome
|
|
29
|
+
last_name:
|
|
30
|
+
label: Cognome
|
data/config/locales/en.yml
CHANGED
|
@@ -1,6 +1,99 @@
|
|
|
1
|
-
---
|
|
2
1
|
en:
|
|
2
|
+
time:
|
|
3
|
+
formats:
|
|
4
|
+
12h_24h: "%H:%M"
|
|
5
|
+
layouts:
|
|
6
|
+
decidim:
|
|
7
|
+
footer:
|
|
8
|
+
decidim_title: "Your platform"
|
|
9
|
+
help_title: "Help"
|
|
3
10
|
decidim:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
core:
|
|
12
|
+
actions:
|
|
13
|
+
unauthorized: "You are not authorized to perform this action."
|
|
14
|
+
wizard_step_form:
|
|
15
|
+
wizard_aside:
|
|
16
|
+
back: "Back"
|
|
17
|
+
authorization_handlers:
|
|
18
|
+
code_census:
|
|
19
|
+
name: "Code census"
|
|
20
|
+
explanation: "Verify your identity using a code census access code."
|
|
21
|
+
application:
|
|
22
|
+
geocoding:
|
|
23
|
+
unconfigured: "Geocoding is not configured for this organization."
|
|
24
|
+
events:
|
|
25
|
+
proposals:
|
|
26
|
+
proposal_state_changed_for_authors:
|
|
27
|
+
affected_user:
|
|
28
|
+
email_intro: 'The proposal "%{resource_title}" has changed its state to "%{state}". You can read the answer in this page:'
|
|
29
|
+
email_outro: You have received this notification because you are an author of "%{resource_title}".
|
|
30
|
+
email_subject: Your proposal has changed its state (%{state})
|
|
31
|
+
notification_title: Your proposal <a href="%{resource_path}">%{resource_title}</a> has changed its state to "%{state}".
|
|
32
|
+
email_intro: 'The proposal "%{resource_title}" has changed its state to "%{state}". You can read the answer in this page:'
|
|
33
|
+
email_outro: You have received this notification because you are an author of "%{resource_title}".
|
|
34
|
+
email_subject: Your proposal has changed its state (%{state})
|
|
35
|
+
notification_title: Your proposal <a href="%{resource_path}">%{resource_title}</a> has changed its state to "%{state}".
|
|
36
|
+
proposals:
|
|
37
|
+
models:
|
|
38
|
+
proposal:
|
|
39
|
+
fields:
|
|
40
|
+
votes_on_going: Votes (ongoing)
|
|
41
|
+
voca:
|
|
42
|
+
proposals:
|
|
43
|
+
find_my_location: "Use my location"
|
|
44
|
+
take_photo: "Take photo"
|
|
45
|
+
footer_text: A democratic space for your community
|
|
46
|
+
code_census:
|
|
47
|
+
create:
|
|
48
|
+
success: "Your access code has been created."
|
|
49
|
+
authorizations:
|
|
50
|
+
new:
|
|
51
|
+
title: Verify with code census
|
|
52
|
+
code: Access code
|
|
53
|
+
submit: Verify
|
|
54
|
+
create:
|
|
55
|
+
success: You are now authorized.
|
|
56
|
+
error: The provided code is not valid.
|
|
57
|
+
admin:
|
|
58
|
+
machine_translation_alert:
|
|
59
|
+
title: |
|
|
60
|
+
Switch language
|
|
61
|
+
description_html: |
|
|
62
|
+
<p>The language "%{current_locale}" is fully translated by machine, you need to switch to "%{default_locale}".</p>
|
|
63
|
+
button: Switch language
|
|
64
|
+
code_census:
|
|
65
|
+
authorizations:
|
|
66
|
+
new:
|
|
67
|
+
title: Generate authorization codes
|
|
68
|
+
intro: Use this page to create authorization codes for your users.
|
|
69
|
+
info: Enter the user details below. The system will generate a unique access code that can be shared with the user for verification.
|
|
70
|
+
example: "Example: Enter user email or identifier"
|
|
71
|
+
code_lists:
|
|
72
|
+
edit:
|
|
73
|
+
title: Code census (%{count})
|
|
74
|
+
form:
|
|
75
|
+
label: Codes
|
|
76
|
+
help: Paste or type all allowed codes, one per line.
|
|
77
|
+
submit: Save codes
|
|
78
|
+
update:
|
|
79
|
+
success: Codes saved.
|
|
80
|
+
error: Codes could not be saved.
|
|
81
|
+
editor_files:
|
|
82
|
+
create:
|
|
83
|
+
success: "File uploaded successfully."
|
|
84
|
+
error: "File could not be uploaded."
|
|
85
|
+
rack_attack:
|
|
86
|
+
blocked:
|
|
87
|
+
title: "Access Temporarily Restricted"
|
|
88
|
+
subtitle: "Rate limit exceeded"
|
|
89
|
+
description: "Too many requests detected. Please wait a few minutes before trying again. Contact support if you need assistance."
|
|
90
|
+
machine_translation_alert:
|
|
91
|
+
title: |
|
|
92
|
+
Switch language
|
|
93
|
+
description_html: |
|
|
94
|
+
<p>The language "%{current_locale}" is fully translated by machine, you need to switch to "%{default_locale}".</p>
|
|
95
|
+
button: Switch language
|
|
96
|
+
devise:
|
|
97
|
+
mailer:
|
|
98
|
+
confirmation_instructions:
|
|
99
|
+
instruction_html: "You can confirm your email account through the link below:"
|