Commit Graph

39 Commits

Author SHA1 Message Date
Paul Chote
67254e0b39 Rename Fluent *GetString methods to GetMessage. 2024-11-03 16:52:47 +02:00
Paul Chote
b57be1cc08 Rework mod content installation. 2024-10-20 15:04:25 +03:00
darkademic
d450ef43c6 Download failure error. 2024-10-12 14:34:04 +03:00
Paul Chote
d6285affec Remove FluentBundle.Arguments helper method. 2024-10-04 15:11:27 +03:00
Paul Chote
b29b685058 Rename Fluent-related code to be more precise. 2024-10-04 15:11:27 +03:00
Matthias Mailänder
b8756c4737 Move CachedTransform to OpenRA.Primitives. 2024-08-03 11:56:43 +03:00
RoosterDragon
2fde98a0d1 Fix uses of LabelWidget.Text and ButtonWidget.Text to use GetText instead.
The Text element of these widgets was changed from display text to a translation key as part of adding translation support. Functions interested in the display text need to invoke GetText instead. Lots of functions have not been updated, resulting in symptoms such as measuring the font size of the translation key rather than the display text and resizing a widget to the wrong size.

Update all callers to use GetText when getting or setting display text. This ensure their existing functionality that was intended to work in terms of the display text and not the translation key works as expected.
2024-01-15 15:16:58 +02:00
Matthias Mailänder
68eec52cef Add TranslationProvider 2023-04-22 19:23:41 +02:00
RoosterDragon
c3e6c4685f Fix CA1849 2023-04-17 00:05:12 +02:00
RoosterDragon
d4135d608e Fix IDE0039 2023-02-27 10:09:11 +01:00
oldnaari
14ad4e168e Update DownloadPackageLogic.cs, to log missing files in package 2023-02-05 20:19:49 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Ivaylo Draganov
a0f17b15ec Refactor translation files
- Add prefixes to all message keys to provide context
- Use messages with attributes for some UI elements (dropdowns, dialogs, checkboxes, menus)
- Rename some class fields for consistency with translation keys
2022-12-19 22:04:54 +13:00
Matthias Mailänder
760a1245c5 Mark non-moddable translation strings as constant. 2022-12-07 18:40:26 +02:00
Matthias Mailänder
14b5504ea7 Show the host in the download failed error message. 2022-11-23 23:35:53 +01:00
Matthias Mailänder
6f4f0c4e8f Fix unknown host not getting translated. 2022-11-23 23:35:53 +01:00
IceReaper
fcc8f53b59 Installer downloads now using specified IPackageLoader. 2022-11-17 21:19:57 +01:00
Matthias Mailänder
0b67b5bfae Extract translation strings. 2022-09-02 14:41:24 +03:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Paul Chote
0dbd8264b8 Handle exceptions thrown by HttpClient.GetAsync. 2022-04-23 22:44:05 +02:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
teinarss
7073279ab8 Replace WebClient with HttpClient 2021-03-07 16:04:57 +00:00
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
03c1eaad76 Add a SHA1 check for downloaded packages. 2019-06-08 13:39:17 +02:00
Paul Chote
f69c6ab3fb Update SharpZipLib to 1.1.0.
The default code page has been changed to UTF8
so our workarounds are no longer needed.
2019-03-30 20:47:22 +01:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
7438af8266 Improve status line display for unknown-size downloads. 2018-09-14 18:55:58 +02:00
Emmalyn Renato
3f4d5fa68c Fix display of progress text in Advanced Install when total file size is unknown. 2018-09-14 17:30:53 +01:00
Dennis Snell
95558a36ab Fix: Display progress message properly when download size missing (#1)
When I downloaded the assets for Red Alert through the Quick Install I noticed the progress bar proceed and display a recognizable message: `Downloading from … 1.47/12 MB (12%)`. This was fine.

When I downloaded the assets for one of the other games, maybe Dune 2000, there was obviously no total download size available. I was an unexpected message: `Downloading from … 1.47/NaN (NaN%)`

The code handling network progress events seems to be aware of the possibility that no full download size exists but it doesn't update the message. In this path I'm proposing that we display a separate messaging indicating that we don't know how much more we have to download for these cases.

Of the alternative ways to implement this I chose to move the reassignment of `getStatusText` into the conditional structures to preserve the existing choice. The message was qualitatively different and so I felt it worthwhile to create entirely different closures vs. doing something like this…

```cs
getStatusText = () => ( Double.isNaN( dataTotal ) ? "Downloading {1} of unknown amount" : "Downloading {1}/{2}" ).F( … );
```
2018-09-13 16:55:51 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
RoosterDragon
297f4ad9ed Ensure we set ZipConstants.DefaultCodePage by using a helper method.
We were currently dealing with this terrible global variable in FileSystem/ZipFile.cs previously, but other parts of the code such as DownloadPackageLogic were creating these files too, and may not have executed the static ctors that fixed the encoding yet.
2017-07-05 22:45:15 +01:00
rob-v
ee91396984 Add exception to Archive extraction failed (Invalid archive) error ##12985 2017-04-13 20:44:03 +02:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
RoosterDragon
f1b0740e72 Allow download window to be closed on failed downloads. 2016-08-25 18:21:40 +01:00
RoosterDragon
3b5798b5e8 Fix cancellation of downloads.
The Download class cancels asynchronously, which means callers must handle cancellation inside the completion event, and not after requesting cancellation.
2016-07-30 16:27:45 +01:00
Matthias Mailänder
d0bada1ae9 Don't crash when ZipFile.GetEntry returns null. 2016-07-09 20:10:53 +02:00
Paul Chote
ff147f39b9 Add new content installer framework. 2016-06-14 18:27:24 +01:00