From 3283da6214102d334f7314c78acaa7fa83492e93 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 11 Mar 2021 10:08:44 +0100 Subject: [PATCH] Add comment indicating that files are auto-generated (#50) --- templates/code_generation_js_file.hbs | 2 ++ templates/code_generation_swift_file.hbs | 2 ++ .../actions/__snapshots__/render.test.js.snap | 32 ++++++++++++++----- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/templates/code_generation_js_file.hbs b/templates/code_generation_js_file.hbs index 09404b0..f83a098 100644 --- a/templates/code_generation_js_file.hbs +++ b/templates/code_generation_js_file.hbs @@ -1,3 +1,5 @@ +// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + {{#languages}} import {{.}} from "./{{.}}/strings.json"; {{/languages}} diff --git a/templates/code_generation_swift_file.hbs b/templates/code_generation_swift_file.hbs index ad635d7..bcc48c5 100644 --- a/templates/code_generation_swift_file.hbs +++ b/templates/code_generation_swift_file.hbs @@ -1,3 +1,5 @@ +// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + import UIKit public protocol LocalizationProvider { diff --git a/tests/actions/__snapshots__/render.test.js.snap b/tests/actions/__snapshots__/render.test.js.snap index c710353..cb9ec97 100644 --- a/tests/actions/__snapshots__/render.test.js.snap +++ b/tests/actions/__snapshots__/render.test.js.snap @@ -30,7 +30,9 @@ Result { "path": ".//js/en/strings.json", }, Object { - "data": "import en from \\"./en/strings.json\\"; + "data": "// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + +import en from \\"./en/strings.json\\"; type LanguageStrings = | typeof en; @@ -170,7 +172,9 @@ It may also contain empty lines to break up text into paragraphs.\\"; "path": ".//android/en/strings.xml", }, Object { - "data": "import UIKit + "data": "// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + +import UIKit public protocol LocalizationProvider { var translationKey: String? { get } @@ -347,7 +351,9 @@ public struct L { "path": ".//ios/Localizable.swift", }, Object { - "data": "import en from \\"./en/strings.json\\"; + "data": "// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + +import en from \\"./en/strings.json\\"; type LanguageStrings = | typeof en; @@ -472,7 +478,9 @@ It may also contain empty lines to break up text into paragraphs.\\"; "path": ".//ios/en/Localizable.strings", }, Object { - "data": "import UIKit + "data": "// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + +import UIKit public protocol LocalizationProvider { var translationKey: String? { get } @@ -852,7 +860,9 @@ De tekst kan zelfs witregels bevatten!\\"; "path": ".//ios/nl/Localizable.strings", }, Object { - "data": "import en from \\"./en/strings.json\\"; + "data": "// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + +import en from \\"./en/strings.json\\"; import nl from \\"./nl/strings.json\\"; type LanguageStrings = | typeof en | typeof nl; @@ -899,7 +909,9 @@ export const translation = ( "path": ".//js/Localizable.ts", }, Object { - "data": "import UIKit + "data": "// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + +import UIKit public protocol LocalizationProvider { var translationKey: String? { get } @@ -1283,7 +1295,9 @@ De tekst kan zelfs witregels bevatten!\\"; "path": ".//ios/nl/Localizable.strings", }, Object { - "data": "import en from \\"./en/strings.json\\"; + "data": "// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + +import en from \\"./en/strings.json\\"; import nl from \\"./nl/strings.json\\"; type LanguageStrings = | typeof en | typeof nl; @@ -1330,7 +1344,9 @@ export const translation = ( "path": ".//js/Localizable.ts", }, Object { - "data": "import UIKit + "data": "// DO NOT EDIT. This file is auto-generated using Localicious (https://github.com/PicnicSupermarket/localicious). + +import UIKit public protocol LocalizationProvider { var translationKey: String? { get }