removing and updating some outdated tips and refactoring tip displaying
Details
- Reviewers
s0600204 Nescio Imarok - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP22137: Remove and Update some outdated tips and refactor tip displaying
check that I did not remove something what should be there
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 6959 Build 11387: Vulcan Build Jenkins Build 11386: arc lint + arc unit
Event Timeline
binaries/data/mods/public/gui/text/tips/quinquereme.txt | ||
---|---|---|
0–1 | Replace with "QUINQUEREME" | |
binaries/data/mods/public/gui/text/tips/scout_towers.txt | ||
4–6 | Actually the attack does not increase, only the number of arrows does, up to a certain maximum. | |
binaries/data/mods/public/gui/text/tips/territory_decay.txt | ||
3 | There shouldn't be a white line here. | |
binaries/data/mods/public/gui/text/tips/triremes.txt | ||
3–4 | "Hellenic factions" is ill-defined; replace it by listing all factions that have triremes. (Kushites?) | |
binaries/data/mods/public/gui/text/tips/war_elephants.txt | ||
3–4 | Check if the last part is true. |
Also, I'd appreciate it if the hyphens could be replaced with bullets ("•" instead of "-").
binaries/data/mods/public/gui/text/tips/army_camp.txt | ||
---|---|---|
9 | Actually there is only one empty line, not two, I just checked, so there is no need to remove them. | |
binaries/data/mods/public/gui/text/tips/celtic_war_barge.txt | ||
2 | Remove the " | |
binaries/data/mods/public/gui/text/tips/embassies.txt | ||
2 | Remove the " | |
4–6 | Remove the " | |
binaries/data/mods/public/gui/text/tips/temples.txt | ||
7–8 | Remove the " | |
binaries/data/mods/public/gui/text/tips/viriato.txt | ||
4 | Remove the ' | |
4 | B.C → BC | |
7–8 | Remove the " | |
7–8 | Has the GT aura that allows ... |
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/969/
binaries/data/mods/public/gui/text/tips/temples.txt | ||
---|---|---|
8–10 | may be better wounded ? |
binaries/data/mods/public/gui/text/tips/temples.txt | ||
---|---|---|
8–10 | Yes, wounded is better. |
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1086/display/redirect
Bullets ought to be used only for itemization. When used as hyphens, hyphens should remain hyphens, of course:
- citizen-soldier
- non-food
- trireme-class
- ethnically-themed
- high-yield
- free-standing
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/differential/1088/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1089/display/redirect
Taking my two comments aside that looks pretty good. (Also it was accepted by others already...)
No need to upload a new version. If we can resolve my two inlines, I'll commit this in the coming days if nobody objects.
binaries/data/mods/public/gui/text/tips/gathering.txt | ||
---|---|---|
10 | Shouldn't that be citizen-soldier? | |
binaries/data/mods/public/gui/text/tips/viriato.txt | ||
6 | Is that the case currently? |
Is it really better to modify every line to use that `•? Translators will have to edit it again. They might do so once, but what if we like to chose a different styling, for example an actual texture?
Alternatives would be keeping the "-" and replacing it if the line begins with that character (sounds like keeping ballast);
or deleting the - and prepending an arbitrary symbol to every line but the first.
XML would be an alternative but had the disadvantage that one can't use the same GUI object structure for every tooltip.
JSON would be an alternative, but I don't see where the txt format is worse than JSON for the loading tips.
Doesn't sound like a good alternative, as some language might want to e.g. add the symbol at the end of the line...
XML would be an alternative but had the disadvantage that one can't use the same GUI object structure for every tooltip.
JSON would be an alternative, but I don't see where the txt format is worse than JSON for the loading tips.
So yes I think (and it seems like you do too) it is best to modify each line.
binaries/data/mods/public/gui/text/tips/viriato.txt | ||
---|---|---|
6 | So shouldn't we remove that line? |
Doesn't sound like a good alternative, as some language might want to e.g. add the symbol at the end of the line...
sprintf(translate("%(symbol)s %(text)s"))
So yes I think (and it seems like you do too) it is best to modify each line.
The difference is that in the one case every line has to be changed and every translation of every line has to be redone everytime one changes the style, as opposed to every line having to be touched only one and then never again if one wants to change the style (but only the one line style definition).
If the textfiles had not contained styling to begin with, this proposed replacement or dash removal would have been unneeded.
Ok, that could work, but what if someone wants to use two lines as heading out of some reason?
I think we shouldn't overcomplicate this issue...
Ok, that could work, but what if someone wants to use two lines as heading out of some reason?
I think we shouldn't overcomplicate this issue...
Then let's don't.
Is there a case to use two lines as a heading, or two lines to the same bullet, and if there is, why doesn't it use one long line and relies on the textwrapping?
If someone comes up with some more desires for this format, they can use JSON, or straight XML.
If one wants to argue with freedom to edit, XML would probably be better in the long term, since it could also specify the image to be shown and other arbitrary sprites.
It's not only the total number of changes each time one wants to change the style, but it also requires translators to get that uncommon character right, for every string, for every translation.
And every language that wants to change the style (like using a different character or different character position, or different whitespace, or two characters) they have to change it consistently in every translated string.
So the choice is between editing every line once and then never again for the purpose of restyling, or editing everyline once and again each time for the purpose of styling.
If we gonna make 100 people edit the translations, we might save some time in the future by picking the alternative with less retranslation in the future.
It's not much effort to ctrl+f those characters.
Either way, not a big defect if we will never again change that format and if all of the translators get the symbol right.
Reasons why I requested bullets:
- These loading tips are simple txt files, not markdown or something
- The gui/manual/intro.txt file also uses bullets for itemization
- The game properly displays many (most?) Unicode symbols, therefore there is no point in limiting ourselves to ascii
- Let's keep hypens for hyphenation and use bullets for itemization; if in the future a different symbol is preferred then people can do a simple find-and-replace
- A bullet looks visually better than a hyphen, especially on the folding lines of that parchment background; it's also clearer on high-resolution screens
- This patch already changes practically all loading tips; including bullets here means translators will have to update the tooltips only once; doing it in a separate patch means they'll have to go over everything twice
The alternative was not not using bullets, but adding the bullets in a single line of JS code instead of hundreds of lines of loading tips.
- This patch already changes practically all loading tips; including bullets here means translators will have to update the tooltips only once; doing it in a separate patch means they'll have to go over everything twice
Noone said we should delete the dash in one commit and then and the bullet in a second commit.
The alternative was to delete the dash in one commit, and add the original content changes in the same commit, and add that one line of JS to prepend the bullet point to every line but the first using sprintf(translate("• %(description)s")).
doing it in a separate patch means they'll have to go over everything twice
Developers and translators will have to go through everything again if deciding to change the bullet point in english or in the translated language.
But if the bullet point is only defined in one line of JS, one only has to change one string in JS or one translation.
The simplicity would remain the same, arguably it would lose a degree of freedom, such as using hyphens in one file and bullet points in another, or messing up the format in the translations.
- The gui/manual/intro.txt file also uses bullets for itemization
I see, but noone said one can't revise that file.
As mentioned it's only a detail and won't affect anything if noone will ever change the bullet point, if all languages use the bullet point and if no translator does a bullet point consistency mistake while translating.
If I understand correctly, you want to have additional code to insert an itemization symbol? Quite frankly, that sounds like a lot of extra work. Besides, it's outside the scope of this patch.
Furthermore, what if a mod wants to use loading tips for something other than a bullet point list?
I don't really want anything other than than a full use of our imagination to explore consequences of patches and alternatives to the first implementation.
Using the patch as is has the clear advantage that there aren't any hidden rules to the txt format and that people who are unfamiliar with JS can use the txt file as is.
to have additional code to insert an itemization symbol? Quite frankly, that sounds like a lot of extra work.
It's a lot of extra work if one has to learn JavaScript for that.
But for the ones who are familiar with that already, it's a one or two line change to be written in 2 minutes.
I've already posted the statement.
Besides, it's outside the scope of this patch.
Not really, if we decide to change every line of every file, then it's the task to determine how every line of every file should be changed optimally.
Furthermore, what if a mod wants to use loading tips for something other than a bullet point list?
Granted (though I seriously wonder whether it wouldn't be preferable to use XML in the long term).
Actually, I need to restrict my grants, because the *txt files already hardcode a specific format that is different from arbitrary text:
let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); Engine.GetGUIObjectByName("tipText").caption = tipText.join("\n"); Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png";
So the code already hardcodes that the first line, and the first line only, to be the caption, displayed in a different GUI Object with a different syle.
Secondly it hardcodes the image filename, so a loading tooltip can't chose to use no image or more than one image, or an image in a different location, etc.
If we want to argue with freedom, the current format doesn't provide it.
It would only be changing this:
Engine.GetGUIObjectByName("tipText").caption = tipText.join("\n");
to
Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => sprintf("• %(tiptext)s", { "text": text })).join("\n");
that's not a lot of work at all (in particular in comparison to changing every line in every file and making every translator copy&paste that bullet symbol for every translation).
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 26| 26| | 27| 27| if (tipFile) | 28| 28| { | 29| |- let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | | 29|+ let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 27| 27| if (tipFile) | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| |- Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | | 30|+ Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| |- Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | | 31|+ Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | 34| 34| return sprintf("• %(tiptext)s", { "tiptext": text }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| |- if (!text) | | 32|+ if (!text) | 33| 33| return ""; | 34| 34| return sprintf("• %(tiptext)s", { "tiptext": text }); | 35| 35| }).join("\n\n"); | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| |- if (!text) | | 32|+ if (!text) | 33| 33| return ""; | 34| 34| return sprintf("• %(tiptext)s", { "tiptext": text }); | 35| 35| }).join("\n\n"); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| |- return ""; | | 33|+ return ""; | 34| 34| return sprintf("• %(tiptext)s", { "tiptext": text }); | 35| 35| }).join("\n\n"); | 36| 36| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | 34| |- return sprintf("• %(tiptext)s", { "tiptext": text }); | | 34|+ return sprintf("• %(tiptext)s", { "tiptext": text }); | 35| 35| }).join("\n\n"); | 36| 36| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 37| 37| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 32| 32| if (!text) | 33| 33| return ""; | 34| 34| return sprintf("• %(tiptext)s", { "tiptext": text }); | 35| |- }).join("\n\n"); | | 35|+ }).join("\n\n"); | 36| 36| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 37| 37| } | 38| 38| else | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 33| 33| return ""; | 34| 34| return sprintf("• %(tiptext)s", { "tiptext": text }); | 35| 35| }).join("\n\n"); | 36| |- Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | 36|+ Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 37| 37| } | 38| 38| else | 39| 39| error("Failed to find any matching tips for the loading screen."); binaries/data/mods/public/gui/loading/loading.js | 48| » » switch·(data.attribs.mapType) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1090/display/redirect
(The hangup was implementing the JS diff?)
(As mentioned, I don't want to lobby for one or the other implementation, more than I want the decision to become as far-sighted and well argued as achievable)
If we use the sprintf approach, adding a translation comment above the translate(sprintf line would probably be advisable:
// Translation: A bullet point of the loading screen tooltip or something like that return sprintf("• %(tiptext)s", { "tiptext": text });
(Can be inserted when committing I guess)
(Also if you change the format and someone is willing to spend the time, he could browse if some of the popular mods use this format and notify them if so. I guess we have a positive here https://github.com/JustusAvramenko/ and a negative there https://github.com/0ADMods/millenniumad/tree/master/gui)
Notice that the mods have to change all lines to use bullet points or no hyphen too, unless they nuke all 0ad tooltips.
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 26| 26| | 27| 27| if (tipFile) | 28| 28| { | 29| |- let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | | 29|+ let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 27| 27| if (tipFile) | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| |- Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | | 30|+ Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| |- Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | | 31|+ Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| |- if (!text) | | 32|+ if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return translate(sprintf("• %(tiptext)s", { "tiptext": text })); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| |- return ""; | | 33|+ return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return translate(sprintf("• %(tiptext)s", { "tiptext": text })); | 36| 36| }).join("\n\n"); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | 34| |- // Translation: A bullet point used before every item of list of tips displayed on loading screen | | 34|+ // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return translate(sprintf("• %(tiptext)s", { "tiptext": text })); | 36| 36| }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 32| 32| if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| |- return translate(sprintf("• %(tiptext)s", { "tiptext": text })); | | 35|+ return translate(sprintf("• %(tiptext)s", { "tiptext": text })); | 36| 36| }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return translate(sprintf("• %(tiptext)s", { "tiptext": text })); | 36| |- }).join("\n\n"); | | 36|+ }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | 39| 39| else | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return translate(sprintf("• %(tiptext)s", { "tiptext": text })); | 36| 36| }).join("\n\n"); | 37| |- Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | 37|+ Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | 39| 39| else | 40| 40| error("Failed to find any matching tips for the loading screen."); binaries/data/mods/public/gui/loading/loading.js | 49| » » switch·(data.attribs.mapType) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1091/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 26| 26| | 27| 27| if (tipFile) | 28| 28| { | 29| |- let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | | 29|+ let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 27| 27| if (tipFile) | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| |- Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | | 30|+ Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| |- Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | | 31|+ Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| |- if (!text) | | 32|+ if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| |- return ""; | | 33|+ return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| 36| }).join("\n\n"); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | 34| |- // Translation: A bullet point used before every item of list of tips displayed on loading screen | | 34|+ // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| 36| }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 32| 32| if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| |- return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | | 35|+ return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| 36| }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| |- }).join("\n\n"); | | 36|+ }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | 39| 39| else | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| 36| }).join("\n\n"); | 37| |- Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | 37|+ Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | 39| 39| else | 40| 40| error("Failed to find any matching tips for the loading screen."); binaries/data/mods/public/gui/loading/loading.js | 49| » » switch·(data.attribs.mapType) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1098/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 26| 26| | 27| 27| if (tipFile) | 28| 28| { | 29| |- let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | | 29|+ let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 27| 27| if (tipFile) | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| |- Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | | 30|+ Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| |- Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | | 31|+ Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| |- if (!text) | | 32|+ if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| |- return ""; | | 33|+ return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| 36| }).join("\n\n"); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| if (!text) | 33| 33| return ""; | 34| |- // Translation: A bullet point used before every item of list of tips displayed on loading screen | | 34|+ // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| 36| }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 32| 32| if (!text) | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| |- return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | | 35|+ return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| 36| }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 33| 33| return ""; | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| |- }).join("\n\n"); | | 36|+ }).join("\n\n"); | 37| 37| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | 39| 39| else | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 34| 34| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 35| 35| return sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 36| 36| }).join("\n\n"); | 37| |- Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | 37|+ Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 38| 38| } | 39| 39| else | 40| 40| error("Failed to find any matching tips for the loading screen."); binaries/data/mods/public/gui/loading/loading.js | 49| » » switch·(data.attribs.mapType) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1099/display/redirect
binaries/data/mods/public/gui/loading/loading.js | ||
---|---|---|
32–35 ↗ | (On Diff #7558) | What about text && sprintf(translate("• %(tiptext)s"), { "tiptext": text })? |
simplify map function
just still dont get this javascript features somehow, there is return text && sprintf("..."), and aside from that the result of this expresion should be true, but it is replaced string
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 26| 26| | 27| 27| if (tipFile) | 28| 28| { | 29| |- let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | | 29|+ let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| // Translation: A bullet point used before every item of list of tips displayed on loading screen | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 27| 27| if (tipFile) | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| |- Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | | 30|+ Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 33| 33| return text && sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 28| 28| { | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| |- Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | | 31|+ Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 33| 33| return text && sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 34| 34| }).join("\n\n"); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 29| 29| let tipText = Engine.TranslateLines(Engine.ReadFile(g_TipsTextPath + tipFile + ".txt")).split("\n"); | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| |- // Translation: A bullet point used before every item of list of tips displayed on loading screen | | 32|+ // Translation: A bullet point used before every item of list of tips displayed on loading screen | 33| 33| return text && sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 34| 34| }).join("\n\n"); | 35| 35| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 30| 30| Engine.GetGUIObjectByName("tipTitle").caption = tipText.shift(); | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 33| |- return text && sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | | 33|+ return text && sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 34| 34| }).join("\n\n"); | 35| 35| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 36| 36| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 31| 31| Engine.GetGUIObjectByName("tipText").caption = tipText.map(text => { | 32| 32| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 33| 33| return text && sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 34| |- }).join("\n\n"); | | 34|+ }).join("\n\n"); | 35| 35| Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 36| 36| } | 37| 37| else | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/loading/loading.js | 32| 32| // Translation: A bullet point used before every item of list of tips displayed on loading screen | 33| 33| return text && sprintf(translate("• %(tiptext)s"), { "tiptext": text }); | 34| 34| }).join("\n\n"); | 35| |- Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | | 35|+ Engine.GetGUIObjectByName("tipImage").sprite = "stretched:" + g_TipsImagePath + tipFile + ".png"; | 36| 36| } | 37| 37| else | 38| 38| error("Failed to find any matching tips for the loading screen."); binaries/data/mods/public/gui/loading/loading.js | 47| » » switch·(data.attribs.mapType) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1126/display/redirect
binaries/data/mods/public/gui/loading/loading.js | ||
---|---|---|
32–35 ↗ | (On Diff #7558) | Good catch, then you can remove the { return ;} part too (no need to upload a new version just for that I guess, unless you have the diff applied already anyhow) |
should not be result of && operation boolean and not string ? But somehow (well javascript) it is string if first is true else it is nothing