mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[loc] set up Windows Store listing translations (part 2)
* Add PowerShell script to generate listing.csv * Also update relevant messages along with French translation
This commit is contained in:
parent
fac433a0fe
commit
3281f6b97e
9 changed files with 818 additions and 248 deletions
|
@ -1,8 +0,0 @@
|
|||
# indicate this is the root of the project
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8-bom
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
File diff suppressed because one or more lines are too long
|
@ -1,31 +0,0 @@
|
|||
# PowerShell script to parse listing.csv and retrieve our screenshots
|
||||
try {
|
||||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||
} catch {}
|
||||
|
||||
# NB: All languages IDs from the .csv are lowercase version of the one
|
||||
# from rufus.loc, except for 'sr-RS' that becomes 'sr-latn-rs'.
|
||||
|
||||
function GetCellByName([object]$csv, [string]$row_name, [string]$column_name)
|
||||
{
|
||||
foreach ($row in $csv | Where-Object {$_.Field -eq $row_name}) {
|
||||
foreach ($column in $row.PSObject.properties) {
|
||||
if ($column.name -eq $column_name) {
|
||||
return $column.value
|
||||
}
|
||||
}
|
||||
}
|
||||
return [string]::Empty
|
||||
}
|
||||
|
||||
$csv = Import-Csv -Path .\listing.csv
|
||||
$langs = $csv | Select-Object -First 1 | Select * -ExcludeProperty 'Field','ID','Type (Type)','default' | ForEach-Object { $_.PSObject.Properties } | Select-Object -ExpandProperty Name
|
||||
|
||||
foreach ($lang in $langs) {
|
||||
$null = New-Item $lang -ItemType Directory -Force
|
||||
$url = GetCellByName $csv 'DesktopScreenshot1' $lang
|
||||
# Annoying but heck if I'm gonna bother with Microsoft's Auth in PowerShell...
|
||||
Start-Process -NoNewWindow -FilePath "C:\Program Files\Mozilla Firefox\firefox.exe" -ArgumentList "-new-tab $url"
|
||||
Write-Host $lang;
|
||||
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue