-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automataCI: added i18n feature to release deb function
Since we want i18n feature to be applied across all package CI job, we should first deal with release deb function. Hence, let's do this. This patch applies i18n feature to release deb function in automataCI/ directory. Co-authored-by: Galyna, Cory <124406765+corygalyna@users.noreply.github.com> Co-authored-by: (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com> Signed-off-by: (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com>
1 parent
0c8214b
commit 90e2ec7
Showing
9 changed files
with
266 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Copyright 2023 (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy | ||
# of the License at: | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
. "${env:LIBS_AUTOMATACI}\services\i18n\printer.ps1" | ||
|
||
|
||
|
||
|
||
function I18N-Status-Print-Run-Publish { | ||
param( | ||
[string]$___subject | ||
) | ||
|
||
|
||
# execute | ||
switch (${env:AUTOMATACI_LANG}) { | ||
default { | ||
# fallback to default english | ||
$___subject = I18N-Status-Param-Process "${___subject}" | ||
$null = I18N-Status-Print info "publishing ${___subject}...`n" | ||
}} | ||
|
||
|
||
# report status | ||
return 0 | ||
} | ||
|
||
|
||
|
||
|
||
function I18N-Status-Print-Run-Publish-Failed { | ||
# execute | ||
switch (${env:AUTOMATACI_LANG}) { | ||
default { | ||
# fallback to default english | ||
$null = I18N-Status-Print error "publish failed.`n`n" | ||
}} | ||
|
||
|
||
# report status | ||
return 0 | ||
} | ||
|
||
|
||
|
||
|
||
function I18N-Status-Print-Run-Publish-Simulated { | ||
param( | ||
[string]$___subject | ||
) | ||
|
||
|
||
# execute | ||
switch (${env:AUTOMATACI_LANG}) { | ||
default { | ||
# fallback to default english | ||
$___subject = I18N-Status-Param-Process "${___subject}" | ||
$null = I18N-Status-Print warning "simulating ${___subject} publications...`n" | ||
}} | ||
|
||
|
||
# report status | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Copyright 2023 (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy | ||
# of the License at: | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
. "${LIBS_AUTOMATACI}/services/i18n/printer.sh" | ||
|
||
|
||
|
||
|
||
I18N_Status_Print_Run_Publish() { | ||
___subject="$1" | ||
|
||
|
||
# execute | ||
case "$AUTOMATACI_LANG" in | ||
*) | ||
# fallback to default english | ||
___subject="$(I18N_Status_Param_Process "${___subject}")" | ||
I18N_Status_Print info "publishing ${___subject}...\n" | ||
;; | ||
esac | ||
|
||
|
||
# report status | ||
return 0 | ||
} | ||
|
||
|
||
|
||
|
||
I18N_Status_Print_Run_Publish_Failed() { | ||
# execute | ||
case "$AUTOMATACI_LANG" in | ||
*) | ||
# fallback to default english | ||
I18N_Status_Print error "publish failed.\n\n" | ||
;; | ||
esac | ||
|
||
|
||
# report status | ||
return 0 | ||
} | ||
|
||
|
||
|
||
|
||
I18N_Status_Print_Run_Publish_Simulated() { | ||
___subject="$1" | ||
|
||
|
||
# execute | ||
case "$AUTOMATACI_LANG" in | ||
*) | ||
# fallback to default english | ||
___subject="$(I18N_Status_Param_Process "${___subject}")" | ||
I18N_Status_Print warning "simulating ${___subject} publications...\n" | ||
;; | ||
esac | ||
|
||
|
||
# report status | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters