Skip to content

Commit 5520084

Browse files
authored
Merge pull request #235 from zendesk/keith/add_strings_for_insecure_token_validation
Add validation string for invalid Secure Settings manifest
2 parents 5247082 + b858d56 commit 5520084

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ zendesk_i18n_file = project_root.join('config/locales/translations/zendesk_apps_
2626
standard_i18n_file = project_root.join('config/locales/en.yml')
2727

2828
file standard_i18n_file => zendesk_i18n_file do |task|
29-
header = "# This file is generated by rake i18n:standardize. Do NOT edit it directly.\n"
29+
header = "# This is a generated file. Do NOT edit directly.\n# To update, run 'bundle exec rake i18n:standardize'.\n"
3030
input = YAML.safe_load(File.read(task.prerequisites.first))
3131
translations = input['parts'].map { |part| part['translation'] }
3232
yaml = YAML.dump('en' => array_to_nested_hash(translations))

config/locales/en.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# This file is generated by rake i18n:standardize. Do NOT edit it directly.
1+
# This is a generated file. Do NOT edit directly.
2+
# To update, run 'bundle exec rake i18n:standardize'.
23
---
34
en:
45
txt:
@@ -74,6 +75,8 @@ en:
7475
style_in_template: "<style> tag in %{template}. Use an app.css file instead."
7576
no_code_for_ifo_notemplate: Javascripts, stylesheets, and templates are
7677
not allowed when an iframe URI or noTemplate is specified
78+
no_source_required_apps: Javascripts, stylesheets, and templates are not
79+
required for marketingOnly or requirementsOnly apps
7780
invalid_default_locale: "%{default_locale} is not a valid default locale."
7881
missing_translation_file: 'Missing translation file for locale ''%{default_locale}''.
7982
Learn more: https://developer.zendesk.com/apps/docs/developer-guide/deploying#app-internationalization'
@@ -84,8 +87,6 @@ en:
8487
blank_location_uri: "%{location} location does not specify a URI."
8588
invalid_location_uri: "%{uri} is either an invalid location URI, refers
8689
to a missing asset, or does not use HTTPS."
87-
signed_setting_uri: The url (%{uri}) cannot use a setting because it is
88-
a signed url.
8990
name_as_parameter_name: Can't call a parameter 'name'
9091
invalid_hidden_parameter:
9192
one: "%{invalid_params} is set to hidden and cannot be required."
@@ -111,6 +112,8 @@ en:
111112
for %{product}: %{missing_key}'
112113
products_do_not_match_manifest_products: Products in manifest (%{manifest_products})
113114
do not match products in translations (%{translation_products})
115+
insecure_token_parameter_in_manifest: 'Make sure to set secure to true
116+
when using keys in Settings. Learn more: %{link}'
114117
stylesheet_error: 'Sass error: %{sass_error}'
115118
invalid_type_parameter:
116119
one: "%{invalid_types} is an invalid parameter type."

config/locales/translations/zendesk_apps_support.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ parts:
1515
key: "txt.apps.admin.error.app_build.jshint.one"
1616
title: "App builder job: JSHint error message"
1717
value: "JSHint error in %{file}: %{errors}"
18+
obsolete: "2019-11-01"
1819
- translation:
1920
key: "txt.apps.admin.error.app_build.jshint.other"
2021
title: "App builder job: JSHint error messages"
2122
value: "JSHint errors in %{file}: %{errors}"
23+
obsolete: "2019-11-01"
2224
- translation:
2325
key: "txt.apps.admin.error.app_build.no_template_deprecated_in_v2"
2426
title: "App builder job: prevent using noTemplate in v2 apps and give advice on how to migrate. Leave noTemplate and autoHide as is (do not localize)"
@@ -167,6 +169,7 @@ parts:
167169
key: "txt.apps.admin.error.app_build.missing_source"
168170
title: "App builder job: missing app.js error"
169171
value: "Could not find app.js"
172+
obsolete: "2019-11-01"
170173
- translation:
171174
key: "txt.apps.admin.error.app_build.style_in_template"
172175
title: "App builder job: <style> tags in template error"
@@ -175,6 +178,12 @@ parts:
175178
key: "txt.apps.admin.error.app_build.no_code_for_ifo_notemplate"
176179
title: "App builder job: code included for a type of app that shouldn't have code"
177180
value: "Javascripts, stylesheets, and templates are not allowed when an iframe URI or noTemplate is specified"
181+
obsolete: "2019-11-01"
182+
- translation:
183+
key: "txt.apps.admin.error.app_build.no_source_required_apps"
184+
title: "Inform users that no source files are required when uploading marketingOnly and requirementsOnly apps. marketingOnly and requirementsOnly are Manifest properties and always English. https://developer.zendesk.com/apps/docs/developer-guide/manifest Also refer https://en.wikipedia.org/wiki/Style_sheet_(web_development) for stylesheets."
185+
value: "Javascripts, stylesheets, and templates are not required for marketingOnly or requirementsOnly apps"
186+
screenshot: "https://drive.google.com/open?id=12B7CMtErshVxI2b-Eo-DjexOqer27oxV"
178187
- translation:
179188
key: "txt.apps.admin.error.app_build.invalid_default_locale"
180189
title: "App builder job: invalid default locale"
@@ -203,12 +212,6 @@ parts:
203212
key: "txt.apps.admin.error.app_build.invalid_location_uri"
204213
title: "App builder job: invalid URI for an iframe in the manifest"
205214
value: "%{uri} is either an invalid location URI, refers to a missing asset, or does not use HTTPS."
206-
- translation:
207-
key: "txt.apps.admin.error.app_build.signed_setting_uri"
208-
title: "App builder job: invalid URI for an iframe in the manifest. The `manifest` is a setting file, the `signed url` is https://cloud.google.com/storage/docs/access-control/signed-urls"
209-
value: "The url (%{uri}) cannot use a setting because it is a signed url."
210-
screenshot: "https://drive.google.com/open?id=1oQmBeGfNT5EDaEH3oEQoNjaCzBw5XAvL"
211-
obsolete: '2019-04-10'
212215
- translation:
213216
key: "txt.apps.admin.error.app_build.name_as_parameter_name"
214217
title: "App builder job: error message when developer names a parameter 'name'"
@@ -224,7 +227,8 @@ parts:
224227
- translation:
225228
key: "txt.apps.admin.warning.app_build.deprecated_version"
226229
title: "App builder job: deprecated version specified"
227-
value: 'You are targeting a deprecated version of the framework. Your app will work, but it might break when the new framework version is deployed.'
230+
value: "You are targeting a deprecated version of the framework. Your app will work, but it might break when the new framework version is deployed."
231+
obsolete: "2019-11-01"
228232
- translation:
229233
key: "txt.apps.admin.warning.app_build.sanitised_svg"
230234
title: "App builder job: warning that contents of svg have been sanitised and overwritten"
@@ -278,6 +282,7 @@ parts:
278282
key: "txt.apps.admin.error.app_build.old_version"
279283
title: "App builder job: old framework version"
280284
value: "Iframe Only apps must target framework versions 2.0 or greater."
285+
obsolete: "2019-11-01"
281286
- translation:
282287
key: "txt.apps.admin.error.app_build.parameters_not_an_array"
283288
title: "App builder job: app parameters must be an array"
@@ -319,6 +324,11 @@ parts:
319324
key: "txt.apps.admin.error.app_build.translation.products_do_not_match_manifest_products"
320325
title: "App builder job: products specified in translation file don't match products in manifest"
321326
value: "Products in manifest (%{manifest_products}) do not match products in translations (%{translation_products})"
327+
- translation:
328+
key: "txt.apps.admin.error.app_build.translation.insecure_token_parameter_in_manifest"
329+
title: "Validation message to indicate missing secure(true) field in manifest's token parameter. secure and true are always English. Do not translate. Secure(true) in manifest refers to https://developer.zendesk.com/apps/docs/developer-guide/using_sdk#using-secure-settings"
330+
value: "Make sure to set secure to true when using keys in Settings. Learn more: %{link}"
331+
screenshot: "https://drive.google.com/open?id=1ss3nNN2RG29R7StjCtiH8qjuwFBlRApJ"
322332
- translation:
323333
key: "txt.apps.admin.error.app_build.stylesheet_error"
324334
title: "App builder job: invalid stylesheet syntax"

0 commit comments

Comments
 (0)