Replies: 8 comments 1 reply
-
Hi, I like the idea too @tpcarman do you have an idea for make this ? |
Beta Was this translation helpful? Give feedback.
-
I'm currently experimenting with how support for other languages could potentially be implemented for AsBuiltReport. ❗ This is not a commitment to adding this feature, I am simply working to determine if it would be feasible. |
Beta Was this translation helpful? Give feedback.
-
@baukeplugge has raised a PR to introduce language templates to the VMware vSphere report. I'd like to discuss the possibility of introducing this to the Core module instead to provide functionality for all reports. @rebelinux @alagoutte let me know what you guys think. I'll provide further feedback once I have had a good look through it. |
Beta Was this translation helpful? Give feedback.
-
Looks good to me. It would also be needed an option to change the language of the content in AsBuiltReport.Core.Style.ps1. Example:
# Add Report Name
Paragraph -Style Title $ReportConfig.Report.Name
if ($AsBuiltConfig.Company.FullName) {
# Add Company Name if specified
BlankLine -Count 1
Paragraph -Style Title2 $AsBuiltConfig.Company.FullName
BlankLine -Count $LineCount
} else {
BlankLine -Count ($LineCount + 1)
}
Table -Name 'Cover Page' -List -Style Borderless -Width 0 -Hashtable ([Ordered] @{
'Author:' = $AsBuiltConfig.Report.Author
'Date:' = (Get-Date).ToLongDateString()
'Version:' = $ReportConfig.Report.Version
})
PageBreak
if ($ReportConfig.Report.ShowTableOfContents) {
# Add Table of Contents
TOC -Name 'Table of Contents'
PageBreak
} The idea of providing a framework in the AsBuiltReport.Core and having each report owner provide the ability to translate its content through the json file would be the best option in my opinion. An English file would be the master template that could perhaps be exported so that the user can translate the content into their preferred language. I have seen a similar concept in the vCheck project. https://github.com/alanrenouf/vCheck-vSphere/blob/master/Lang/en-US/vCheck.psd1 |
Beta Was this translation helpful? Give feedback.
-
My initial thoughts are that we create the JSON structure similiar to the report config JSON so that it aligns more to the structure of the report. {
"Message": {
"MessageURL": "Please refer to www.asbuiltreport.com for more detailed information about this project.",
"MessageIssues": "Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues",
"MessageDocumentation": "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere",
"MessageUpdate": "Do not forget to update your report configuration file after each new version release.",
"MessageInstalledVersion": "The current installed version of AsBuiltReport.VMware.vSphere is ",
"MessageNewVersion": "The latest version of AsBuiltReport.VMware.vSphere available is ",
"MessageUpdateInstruction": "Run 'Update-Module -Name AsBuiltReport.VMware.vSphere -Force' to install the latest version.",
"MessageConnecting": "Connecting to vCenter Server ",
"MessagevCenterPrivilegesCheck": "Checking vCenter user privileges.",
"MessagevCenterPrivilegesError": "Unable to obtain vCenter user privileges.",
"MessageVMLookup": "Creating VM lookup hashtable.",
"MessageVMHostLookup": "Creating VMHost lookup hashtable.",
"MessageDatastoreLookup": "Creating Datastore lookup hashtable.",
"MessageVDPortGroupLookup": "Creating VDPortGroup lookup hashtable.",
"MessageEVCLookup": "Creating EVC lookup hashtable.",
"MessageVUM": "Checking for VMware Update Manager Server.",
"MessageVXRail": "Checking for VxRail Manager Server.",
"MessageSRM": "Checking for VMware Site Recovery Manager Server.",
"MessageNSX": "Checking for VMware NSX-T Manager Server.",
"MessageVcenterAdv": "Collecting advanced settings of vCenter Server ",
"MessageInfoLevel": "vCenter InfoLevel set at "
},
"Keyword": {
"Keyword_Description": "Description",
"Keyword_IPAddress": "IP Address",
"Keyword_MACAddress": "MAC Address",
"Keyword_Capacity": "Capacity",
"Keyword_Mailsettings": "Mail Settings",
"Keyword_MailSender": "Mail Sender",
"Keyword_SMTPServer": "SMTP Server",
"Keyword_SMTPPort": "SMTP Port",
"Keyword_HistoricalStatistics": "Historical Statistics",
"Keyword_Licensing": "Licensing",
"Keyword_Total": "Total",
"Keyword_Used": "Used",
"Keyword_LicenseKey": "License Key",
"Keyword_Available": "Available"
},
"Cluster": {
"ConfigDetails_vCenter": "The following sections detail the configuration of vCenter Server ",
"ClusterDetailsIntro_vCenter": "The following sections detail the configuration of vSphere HA/DRS clusters managed by vCenter Server ",
"ClusterDetails_vCenter": "The following table details the configuration for cluster ",
"ClusterDetailsHA_vCenter": "The following section details the vSphere HA configuration for cluster ",
"ClusterDetailsProactiveHA_vCenter": "The following section details the Proactive HA configuration for cluster ",
"ClusterDetailsDRS_vCenter": "The following table details the vSphere DRS configuration for cluster ",
"ClusterDetailsPermissions_vCenter": "The following table details the permissions assigned to cluster ",
"ClusterDetailsResourcePool_vCenter": "The following sections detail the configuration of resource pools managed by vCenter Server ",
"ClusterDetailsHosts_vCenter": "The following sections detail the configuration of VMware ESXi hosts managed by vCenter Server ",
"ClusterDetailsHostsHardware_vCenter": "The following section details the host hardware configuration for "
},
"ResourcePool": {
},
"VMHost": {
"HostsConfigDetails_vCenter": "The following section details the host system configuration for ",
"HostsStorage_vCenter": "The following section details the host storage configuration for ",
"HostsStorageAdapters_vCenter": "The following section details the storage adapter configuration for ",
"HostsNetwork_vCenter": "The following section details the host network configuration for ",
"HostsNetworkPhysical_vCenter": "The following section details the physical network adapter configuration for ",
"HostsNetworkCDP_vCenter": "The following section details the CDP information for ",
"HostsNetworkLLDP_vCenter": "The following section details the LLDP information for ",
"HostsNetworkVMkernel_vCenter": "The following section details the VMkernel adapter configuration for ",
"HostsNetworkvSwitch_vCenter": "The following section details the standard virtual switch configuration for ",
"HostsSecurity_vCenter": "The following section details the host security configuration for ",
"HostsVM_vCenter": "The following section details the virtual machine configuration for ",
"HostsNetworkDVS_vCenter": "The following sections detail the configuration of distributed switches managed by vCenter Server "
},
"Network": {
},
"vSAN": {
},
"Datastore": {
},
"DSCluster": {
},
"VM": {
},
"VUM": {
}
} If structured like above, a standard prefix might not be necessary? Not sure. But if it was, then prefixes like I don't speak multiple languages so I don't know how far we need to go with this? Here's a couple of questions for you:
"Report": {
"Name": "VMware vSphere As Built Report",
"Version": "1.0",
"Status": "Released",
"ShowCoverPageImage": true,
"ShowTableOfContents": true,
"ShowHeaderFooter": true,
"ShowTableCaptions": true,
"Language": "en-GB"
} I'll keep thinking and playing with this idea. |
Beta Was this translation helpful? Give feedback.
-
i'll test to see if I can change the function to use the structured JSON input. I think that would be much clearer to read the file.
Maybe French,Spanish and German? |
Beta Was this translation helpful? Give feedback.
-
I have updated the functions and made the get-asbuiltTranslation public: function Get-AsBuiltTranslation {
} I have placed this in the .core code and placed the load-translations in the private and got those loaded aswell. Function to load translations from a JSON filefunction Load-Translations {
} i have adjusted the json like this to get a translation: Get-AsBuiltTranslation -Product "vCenter" -Category "messages" -Key "ConfigDetails_vCenter" this is working fine. |
Beta Was this translation helpful? Give feedback.
-
Hi, Sorry guy for delay... but great news about some update about translation
not sure about json, is the better for translation file, often the translator guy are not really dev guy... also for translation, there is often problem with number (display number or plural it can be complicated ^^) |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
It would be beneficial to add the option to generate the report in an available language. I don't know if it is achievable but maybe there could be a JSON file with the translations depending on the language. With the option for the user to create the JSON with the language of his choice based on a default english template
Describe the solution you'd like
Command Example
Section Example
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Beta Was this translation helpful? Give feedback.
All reactions