Page MenuHomeWildfire Games

Delete gui/common/l10n.js
ClosedPublic

Authored by elexis on Jun 9 2017, 9:44 PM.

Details

Reviewers
None
Commits
rP19779: Delete common/l10n.js.
Summary

The file was added by rP16127 and most of its content was removed with rP18964. Now it would be better to remove this file and move its contents to the file with related functions.
The removed warnings with rP18964 can be implemented in a similar way for which I have a separate patch.

Also remove a wrong comma from the JSdoc comment.

Test Plan

Read.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

elexis created this revision.Jun 9 2017, 9:44 PM
Vulcan added a subscriber: Vulcan.Jun 10 2017, 12:21 AM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1520/ for more details.

Executing section Default...
Executing section Source...
Executing section JS...

binaries/data/mods/public/gui/common/tooltips.js
| 591| »   »   '[/color][/font]'·+·"·"·+
|    | [NORMAL] ESLintBear (no-useless-concat):
|    | Unexpected string concatenation of literals.

binaries/data/mods/public/gui/common/tooltips.js
| 422| »   »   let·[rate,·count]·=·types.reduce((sum,·t)·=>·{
|    | [NORMAL] JSHintBear:
|    | Don't make functions within a loop.

binaries/data/mods/public/gui/common/tooltips.js
| 603| »   if·(walk·==·0·&&·run·==·0)
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/gui/common/tooltips.js
| 603| »   if·(walk·==·0·&&·run·==·0)
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.
Executing section XML GUI...
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|   1|   1| <?xml version="1.0" encoding="utf-8"?>
|   2|    |-
|   3|   2| <objects>
|   4|   3| 
|   5|   4| <script file="gui/common/color.js"/>
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|  56|  56| 
|  57|  57| 	<!-- Network status -->
|  58|  58| 	<object name="netStatus" type="text" style="netStatus" z="0" hidden="true">
|  59|    |-		<object type="button"
|  60|    |-			name="disconnectedExitButton"
|  61|    |-			style="StoneButton"
|  62|    |-			size="50%-84 50%+128 50%+84 50%+160"
|  63|    |-			tooltip_style="sessionToolTip"
|  64|    |-			z="0"
|  65|    |-		>
|    |  59|+		<object type="button" name="disconnectedExitButton" style="StoneButton" size="50%-84 50%+128 50%+84 50%+160" tooltip_style="sessionToolTip" z="0">
|  66|  60| 			<translatableAttribute id="caption">Exit</translatableAttribute>
|  67|  61| 			<action on="Press">leaveGame();</action>
|  68|  62| 		</object>
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|  93|  93| 	</object>
|  94|  94| 
|  95|  95| 	<!-- Entity selection state text -->
|  96|    |-	<object name="debugEntityState"
|  97|    |-		type="text"
|  98|    |-		size="0 70 80% 100%"
|  99|    |-		ghost="true"
| 100|    |-		textcolor="yellow"
| 101|    |-		font="mono-stroke-10"
| 102|    |-	/>
|    |  96|+	<object name="debugEntityState" type="text" size="0 70 80% 100%" ghost="true" textcolor="yellow" font="mono-stroke-10"/>
| 103|  97| 
| 104|  98| 	<include directory="gui/session/dialogs/"/>
| 105|  99| 	<include file="gui/session/chat_window.xml"/>
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
| 129| 129| 		<include file="gui/session/minimap_panel.xml"/>
| 130| 130| 
| 131| 131| 		<!-- Supplemental Details Panel (Left of Selection Details) -->
| 132|    |-		<object
| 133|    |-			size="50%-304 100%-170 50%-110 100%"
| 134|    |-			name="supplementalSelectionDetails"
| 135|    |-			type="image"
| 136|    |-			sprite="supplementalDetailsPanel"
| 137|    |-			z="20"
| 138|    |-		>
|    | 132|+		<object size="50%-304 100%-170 50%-110 100%" name="supplementalSelectionDetails" type="image" sprite="supplementalDetailsPanel" z="20">
| 139| 133| 			<include directory="gui/session/selection_panels_left/"/>
| 140| 134| 		</object>
| 141| 135| 
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
| 140| 140| 		</object>
| 141| 141| 
| 142| 142| 		<!-- Selection Details Panel (Middle) -->
| 143|    |-		<object name="selectionDetails"
| 144|    |-			type="image"
| 145|    |-			sprite="selectionDetailsPanel"
| 146|    |-			size="50%-114 100%-205 50%+114 100%"
| 147|    |-			hidden="false"
| 148|    |-		>
|    | 143|+		<object name="selectionDetails" type="image" sprite="selectionDetailsPanel" size="50%-114 100%-205 50%+114 100%" hidden="false">
| 149| 144| 			<include directory="gui/session/selection_panels_middle/"/>
| 150| 145| 		</object>
| 151| 146| 
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
| 150| 150| 		</object>
| 151| 151| 
| 152| 152| 		<!-- Commands Panel (Right of Selection Details) -->
| 153|    |-		<object name="unitCommands"
| 154|    |-			type="image"
| 155|    |-			sprite="unitCommandsPanel"
| 156|    |-			size="50%+110 100%-170 50%+512 100%"
| 157|    |-			hidden="false"
| 158|    |-			z="20"
| 159|    |-		>
|    | 153|+		<object name="unitCommands" type="image" sprite="unitCommandsPanel" size="50%+110 100%-170 50%+512 100%" hidden="false" z="20">
| 160| 154| 			<include directory="gui/session/selection_panels_right/"/>
| 161| 155| 		</object>
| 162| 156| 	</object><!-- END OF BOTTOM PANEL -->
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/163/ for more details.

fabio added a subscriber: fabio.Jun 11 2017, 11:59 AM
elexis updated this revision to Diff 2546.Jun 13 2017, 5:38 AM
elexis added a subscriber: Itms.

Rebase and also return a string, not an array for length 0 or 1 which just happened to be handled "for convenience" by sprintf.js.

@Itms moving this string to a different file of the same transifex resource doesn't break translation freeze, does it?

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1550/ for more details.

Executing section Default...
Executing section Source...
Executing section JS...

binaries/data/mods/public/gui/common/tooltips.js
| 601| »   »   '[/color][/font]'·+·"·"·+
|    | [NORMAL] ESLintBear (no-useless-concat):
|    | Unexpected string concatenation of literals.

binaries/data/mods/public/gui/common/tooltips.js
| 434| »   »   let·[rate,·count]·=·types.reduce((sum,·t)·=>·{
|    | [NORMAL] JSHintBear:
|    | Don't make functions within a loop.

binaries/data/mods/public/gui/common/tooltips.js
| 613| »   if·(walk·==·0·&&·run·==·0)
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.

binaries/data/mods/public/gui/common/tooltips.js
| 613| »   if·(walk·==·0·&&·run·==·0)
|    | [NORMAL] JSHintBear:
|    | Use '===' to compare with '0'.
Executing section XML GUI...
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|   1|   1| <?xml version="1.0" encoding="utf-8"?>
|   2|    |-
|   3|   2| <objects>
|   4|   3| 
|   5|   4| <script file="gui/common/color.js"/>
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|  56|  56| 
|  57|  57| 	<!-- Network status -->
|  58|  58| 	<object name="netStatus" type="text" style="netStatus" z="0" hidden="true">
|  59|    |-		<object type="button"
|  60|    |-			name="disconnectedExitButton"
|  61|    |-			style="StoneButton"
|  62|    |-			size="50%-84 50%+128 50%+84 50%+160"
|  63|    |-			tooltip_style="sessionToolTip"
|  64|    |-			z="0"
|  65|    |-		>
|    |  59|+		<object type="button" name="disconnectedExitButton" style="StoneButton" size="50%-84 50%+128 50%+84 50%+160" tooltip_style="sessionToolTip" z="0">
|  66|  60| 			<translatableAttribute id="caption">Exit</translatableAttribute>
|  67|  61| 			<action on="Press">leaveGame();</action>
|  68|  62| 		</object>
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|  93|  93| 	</object>
|  94|  94| 
|  95|  95| 	<!-- Entity selection state text -->
|  96|    |-	<object name="debugEntityState"
|  97|    |-		type="text"
|  98|    |-		size="0 70 80% 100%"
|  99|    |-		ghost="true"
| 100|    |-		textcolor="yellow"
| 101|    |-		font="mono-stroke-10"
| 102|    |-	/>
|    |  96|+	<object name="debugEntityState" type="text" size="0 70 80% 100%" ghost="true" textcolor="yellow" font="mono-stroke-10"/>
| 103|  97| 
| 104|  98| 	<include directory="gui/session/dialogs/"/>
| 105|  99| 	<include file="gui/session/chat_window.xml"/>
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
| 129| 129| 		<include file="gui/session/minimap_panel.xml"/>
| 130| 130| 
| 131| 131| 		<!-- Supplemental Details Panel (Left of Selection Details) -->
| 132|    |-		<object
| 133|    |-			size="50%-304 100%-170 50%-110 100%"
| 134|    |-			name="supplementalSelectionDetails"
| 135|    |-			type="image"
| 136|    |-			sprite="supplementalDetailsPanel"
| 137|    |-			z="20"
| 138|    |-		>
|    | 132|+		<object size="50%-304 100%-170 50%-110 100%" name="supplementalSelectionDetails" type="image" sprite="supplementalDetailsPanel" z="20">
| 139| 133| 			<include directory="gui/session/selection_panels_left/"/>
| 140| 134| 		</object>
| 141| 135| 
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
| 140| 140| 		</object>
| 141| 141| 
| 142| 142| 		<!-- Selection Details Panel (Middle) -->
| 143|    |-		<object name="selectionDetails"
| 144|    |-			type="image"
| 145|    |-			sprite="selectionDetailsPanel"
| 146|    |-			size="50%-114 100%-205 50%+114 100%"
| 147|    |-			hidden="false"
| 148|    |-		>
|    | 143|+		<object name="selectionDetails" type="image" sprite="selectionDetailsPanel" size="50%-114 100%-205 50%+114 100%" hidden="false">
| 149| 144| 			<include directory="gui/session/selection_panels_middle/"/>
| 150| 145| 		</object>
| 151| 146| 
|    | [INFO] XMLBear:
|    | XML can be formatted better.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/gui/session/session.xml
| 150| 150| 		</object>
| 151| 151| 
| 152| 152| 		<!-- Commands Panel (Right of Selection Details) -->
| 153|    |-		<object name="unitCommands"
| 154|    |-			type="image"
| 155|    |-			sprite="unitCommandsPanel"
| 156|    |-			size="50%+110 100%-170 50%+512 100%"
| 157|    |-			hidden="false"
| 158|    |-			z="20"
| 159|    |-		>
|    | 153|+		<object name="unitCommands" type="image" sprite="unitCommandsPanel" size="50%+110 100%-170 50%+512 100%" hidden="false" z="20">
| 160| 154| 			<include directory="gui/session/selection_panels_right/"/>
| 161| 155| 		</object>
| 162| 156| 	</object><!-- END OF BOTTOM PANEL -->
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/191/ for more details.

This revision was automatically updated to reflect the committed changes.