Skip to content

Commit afad368

Browse files
committed
Add multi-lingual support
1 parent 731bd6e commit afad368

23 files changed

+1018
-281
lines changed

AsBuiltReport.Core.Style.ps1

Lines changed: 11 additions & 10 deletions
Large diffs are not rendered by default.

AsBuiltReport.Core.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
# RequireLicenseAcceptance = $false
123123

124124
# External dependent modules of this module
125-
# ExternalModuleDependencies = @()
125+
# ExternalModuleDependencies = @('PScribo')
126126

127127
} # End of PSData hashtable
128128

AsBuiltReport.Core.psm1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# Get public function definition files and dot source them
2-
$Public = @(Get-ChildItem -Path $PSScriptRoot\Src\Public\*.ps1)
1+
# Get public and private function definition files and dot source them
2+
$Public = @(Get-ChildItem -Path $PSScriptRoot\Src\Public\*.ps1 -ErrorAction SilentlyContinue)
3+
$Private = @(Get-ChildItem -Path $PSScriptRoot\Src\Private\*.ps1 -ErrorAction SilentlyContinue)
34

4-
foreach ($Module in ($Public)) {
5+
foreach ($Module in @($Public + $Private)) {
56
try {
67
. $Module.FullName
78
} catch {
@@ -10,3 +11,4 @@ foreach ($Module in ($Public)) {
1011
}
1112

1213
Export-ModuleMember -Function $Public.BaseName
14+
Export-ModuleMember -Function $Private.BaseName

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.5.0] - Unreleased
9+
10+
### Added
11+
- Add multilingual support for core module
12+
13+
### Changed
14+
- UI enhancements
15+
- Improve error handling
16+
817
## [1.4.3] - 2025-03-08
918

1019
### Changed

Language/en-US/DefaultStyle.psd1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# culture = 'en-US'
2+
ConvertFrom-StringData @'
3+
Footer = Page <!# PageNumber #!>
4+
Logo = AsBuiltReport Logo
5+
CoverPageWarning = Unable to display cover page image. Please set 'ShowCoverPageImage' to 'false' in the report JSON configuration file to avoid this error.
6+
CoverPage = Cover Page
7+
Author = Author:
8+
Date = Date:
9+
Version = Version:
10+
TOC = Table of Contents
11+
'@
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# culture = 'en-US'
2+
@{
3+
4+
# As Built Report Information
5+
ReportInfo = ConvertFrom-StringData @'
6+
BannerTitle = As Built Report Information
7+
ReportAuthor = Enter the name of the author for this As Built Report [{0}]
8+
'@
9+
10+
# Company Configuration
11+
CompanyConfig = ConvertFrom-StringData @'
12+
BannerTitle = Company Information
13+
CompanyInfo = Would you like to enter company information for the As Built Report? (y/n)
14+
CompanyFullName = Enter the Full Company Name
15+
CompanyShortName = Enter the Company Short Name
16+
CompanyContact = Enter the Company Contact
17+
CompanyEmail = Enter the Company Email Address
18+
CompanyPhone = Enter the Company Phone Number
19+
CompanyAddress = Enter the Company Address
20+
'@
21+
22+
# Email Configuration
23+
EmailConfig = ConvertFrom-StringData @'
24+
BannerTitle = Email Configuration
25+
ConfigureMailSettings = Would you like to enter SMTP configuration? (y/n)
26+
MailServer = Enter the mail server FQDN / IP address
27+
EmptyMailServerAddress = Mail server address cannot be empty. Please enter a valid mail server FQDN / IP address.
28+
InvalidMailServer = '{0}' is not a valid FQDN or IP address. Please enter a valid mail server FQDN / IP address.
29+
MailServerPort587 = Enter the mail server port number [587]
30+
InvalidMailServerPort587 = Invalid port number. Please enter a number between 1 and 65535, or press Enter for default [587].
31+
MailServerPort25 = Enter the mail server port number [25]
32+
InvalidMailServerPort25 = Invalid port number. Please enter a number between 1 and 65535, or press Enter for default [25].
33+
MailServerUseSSL = Use SSL for mail server connection? (y/n)
34+
MailCredentials = Require mail server authentication? (y/n)
35+
MailFrom = Enter the mail sender email address
36+
MailTo = Enter the mail server recipient email address
37+
EmptyEmail = Email address cannot be empty. Please enter a valid email address.
38+
InvalidEmail = '{0}' is not a valid email address. Please enter a valid email address.
39+
AnotherRecipient = Do you want to enter another recipient? (y/n)
40+
MailBodyPrompt = Enter the email message body content
41+
MailBody = As Built Report attached
42+
'@
43+
44+
# Report Configuration
45+
ReportConfig = ConvertFrom-StringData @'
46+
BannerTitle = As Built Report Configuration
47+
ReportConfigFolder = Enter the full path of the folder to use for storing report configuration files and custom style scripts [{0}]
48+
OverwriteReportConfig = A report configuration file already exists in the specified folder for {0}. Would you like to overwrite it? (y/n)
49+
CopyFile = Copying '{0}' to '{1}'.
50+
OverwriteFile = Copying '{0}' to '{1}'. Overwriting existing file.
51+
SaveAsBuiltConfig = Would you like to save the As Built Report configuration file? (y/n)
52+
AsBuiltName = Enter a name for the As Built Report configuration file [AsBuiltReport]
53+
AsBuiltExportPath = Enter the path to save the As Built Report configuration file [{0}]
54+
ConfigFolder = Creating As Built Report configuration folder '{0}'.
55+
SaveConfig = Saving As Built Report configuration file '{0}.json' to path '{1}'.
56+
NotSaved = As Built Report configuration file not saved.
57+
'@
58+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# culture = 'en-US'
2+
ConvertFrom-StringData @'
3+
PwshISE = AsBuiltReport cannot be run from Windows PowerShell ISE. Please use a PowerShell command window instead.
4+
Password = Password for user {0}
5+
OutputFolderPath = OutputFolderPath '{0}' is not a valid folder path.
6+
LoadConfig = Loading As Built Report configuration from {0}.
7+
NoConfigFound = Could not find As Built Report configuration in path '{0}'.
8+
GeneratingReport = Generating new As Built Report configuration.
9+
StyleScriptNotFound = Could not find report style script in path '{0}'.
10+
ReportModuleNotFound = Could not find {0} report configuration file in path '{1}'.
11+
LoadingReportConfig = Loading {0} report configuration file from path '{1}'.
12+
ReportConfigNotFound = Report configuration not found in module path '{0}'.
13+
SetReportFileName = Setting report file name to '{0}'.
14+
EmailBannerTitle = Email Server Credentials
15+
EmailCredentials = Please enter credentials for {0}.
16+
InstalledModule = AsBuiltReport.Core {0} is currently installed.
17+
AvailableModule = AsBuiltReport.Core {0} is available.
18+
UpdateModule = Run 'Update-Module -Name AsBuiltReport.Core -Force' to install the latest version.
19+
ReportGenerating = Please wait while the {0} As Built Report is being generated.
20+
ReportStyleScript = Executing report style script from path '{0}'.
21+
MfaEnabled = MFA is enabled, please check for MFA authentication windows to generate your report.
22+
OutputFolder = {0} As Built Report '{1}' has been saved to '{2}'.
23+
'@
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# culture = 'en-US'
2+
ConvertFrom-StringData @'
3+
FolderNotExist = The folder '{0}' does not exist. Please create the folder and run New-AsBuiltReportConfig again.
4+
ProcessConfig = Processing {0} report configuration file from module {1}, version {2}.
5+
CopyConfig = Copying report configuration file '{0}' to '{1}'.
6+
CopyModuleConfig = Copying {0} report configuration file '{1}' to '{2}'.
7+
CreateConfig = {0} report configuration file '{1}.json' created in '{2}'.
8+
OverWriteConfig = Copying report configuration file '{0})' to '{1}'. Overwriting existing file.
9+
ForceOverwrite = {0} report configuration file '{1}.json' already exists in '{2}'. Use '-Force' to overwrite existing file.
10+
ConfigNotFound = Report configuration file not found in module path '{0}'.
11+
'@

Language/es-ES/DefaultStyle.psd1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# culture = 'es-ES'
2+
ConvertFrom-StringData @'
3+
Footer = Página <!# PageNumber #!>
4+
Logo = AsBuiltReport Logo
5+
CoverPageWarning = No se puede mostrar la imagen de portada. Configure "ShowCoverPageImage" como "false" en el archivo de configuración JSON del informe para evitar este error.
6+
CoverPage = Portada
7+
Author = Autor:
8+
Date = Fecha:
9+
Version = Versión:
10+
TOC = Tabla de contenido
11+
'@
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# culture = 'es-ES'
2+
@{
3+
4+
# Información del Informe As Built
5+
ReportInfo = ConvertFrom-StringData @'
6+
BannerTitle = Información del Informe As Built
7+
ReportAuthor = Ingrese el nombre del autor para este Informe As Built [{0}]
8+
'@
9+
10+
# Configuración de la Empresa
11+
CompanyConfig = ConvertFrom-StringData @'
12+
BannerTitle = Información de la Empresa
13+
CompanyInfo = ¿Desea ingresar información de la empresa para el Informe Según Construcción? (y/n)
14+
CompanyFullName = Ingrese el Nombre Completo de la Empresa
15+
CompanyShortName = Ingrese el Nombre Corto de la Empresa
16+
CompanyContact = Ingrese el Contacto de la Empresa
17+
CompanyEmail = Ingrese la Dirección de Correo Electrónico de la Empresa
18+
CompanyPhone = Ingrese el Número de Teléfono de la Empresa
19+
CompanyAddress = Ingrese la Dirección de la Empresa
20+
'@
21+
22+
# Configuración de Correo Electrónico
23+
EmailConfig = ConvertFrom-StringData @'
24+
BannerTitle = Configuración de Correo Electrónico
25+
ConfigureMailSettings = ¿Le gustaría ingresar la configuración SMTP? (y/n)
26+
MailServer = Ingrese el FQDN / dirección IP del servidor de correo
27+
EmptyMailServerAddress = La dirección del servidor de correo no puede estar vacía. Por favor ingrese un FQDN / dirección IP válida del servidor de correo.
28+
InvalidMailServer = '{0}' no es un FQDN o dirección IP válida. Por favor ingrese un FQDN / dirección IP válida del servidor de correo.
29+
MailServerPort587 = Ingrese el número de puerto del servidor de correo [587]
30+
InvalidMailServerPort587 = Número de puerto inválido. Por favor ingrese un número entre 1 y 65535, o presione Enter para el valor predeterminado [587].
31+
MailServerPort25 = Ingrese el número de puerto del servidor de correo [25]
32+
InvalidMailServerPort25 = Número de puerto inválido. Por favor ingrese un número entre 1 y 65535, o presione Enter para el valor predeterminado [25].
33+
MailServerUseSSL = ¿Se requiere autenticación del servidor de correo? (y/n)
34+
MailCredentials = ¿Requiere autenticación del servidor de correo? (y/n)
35+
MailFrom = Ingrese la dirección de correo electrónico del remitente
36+
MailTo = Introduzca la dirección de correo electrónico del destinatario del servidor de correo
37+
EmptyEmail = La dirección de correo electrónico no puede estar vacía. Por favor ingrese una dirección de correo electrónico válida.
38+
InvalidEmail = '{0}' no es una dirección de correo electrónico válida. Por favor ingrese una dirección de correo electrónico válida.
39+
AnotherRecipient = ¿Quieres introducir otro destinatario? (y/n)
40+
MailBodyPrompt = Ingrese el contenido del cuerpo del mensaje de correo electrónico
41+
MailBody = Informe As Built adjunto
42+
'@
43+
44+
# Configuración del Informe
45+
ReportConfig = ConvertFrom-StringData @'
46+
BannerTitle = Configuración del Informe Según Construcción
47+
ReportConfigFolder = Ingrese la ruta completa de la carpeta a usar para almacenar archivos de configuración del informe y scripts de estilo personalizados [{0}]
48+
OverwriteReportConfig = Ya existe un archivo de configuración del informe en la carpeta especificada para {0}. ¿Le gustaría sobrescribirlo? (y/n)
49+
CopyFile = Copiando '{0}' a '{1}'.
50+
OverwriteFile = Copiando '{0}' a '{1}'. Sobrescribiendo archivo existente.
51+
SaveAsBuiltConfig = ¿Le gustaría guardar el archivo de configuración del Informe As Built? (y/n)
52+
AsBuiltName = Ingrese un nombre para el archivo de configuración del Informe As Built [AsBuiltReport]
53+
AsBuiltExportPath = Ingrese la ruta para guardar el archivo de configuración del Informe As Built [{0}]
54+
ConfigFolder = Creando carpeta de configuración del Informe As Built '{0}'.
55+
SaveConfig = Guardando archivo de configuración del Informe As Built '{0}.json' en la ruta '{1}'.
56+
NotSaved = Archivo de configuración del Informe As Built no guardado.
57+
'@
58+
}

0 commit comments

Comments
 (0)