Skip to content

Commit

Permalink
Merge pull request #3707 from ChrisCookOC/develop
Browse files Browse the repository at this point in the history
Added missing localization strings for Edit Token dialog.
  • Loading branch information
Phergus committed Oct 11, 2022
2 parents 0bbb599 + 4a61cc0 commit ff19aa8
Show file tree
Hide file tree
Showing 23 changed files with 199 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ public Object childEvaluate(
if (functionName.equalsIgnoreCase("removeTokenFacing")) {
FunctionUtil.checkNumberParam(functionName, parameters, 0, 2);
Token token = FunctionUtil.getTokenFromParam(resolver, functionName, parameters, 0, 1);
MapTool.serverCommand().updateTokenProperty(token, Token.Update.setFacing, (Integer) null);
MapTool.serverCommand().updateTokenProperty(token, Token.Update.removeFacing);
return "";
}

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/net/rptools/maptool/client/tool/GridTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ protected void installKeystrokes(Map<KeyStroke, Action> actionMap) {

private void copyGridToControlPanel() {
Zone zone = renderer.getZone();

Grid grid = zone.getGrid();

updateSecondDimension(grid, true);
gridSizeSpinner.setValue(grid.getSize());
gridOffsetXTextField.setText(Integer.toString(grid.getOffsetX()));
gridOffsetYTextField.setText(Integer.toString(grid.getOffsetY()));
colorWell.setColor(new Color(zone.getGridColor()));
// Setting the size must be done last as it triggers a ChangeEvent
// which causes copyControlPanelToGrid() to be called.
gridSizeSpinner.setValue(grid.getSize());

resetZoomSlider();
}
Expand Down Expand Up @@ -190,10 +191,10 @@ private void copyControlPanelToGrid() {
Grid grid = zone.getGrid();

updateSecondDimension(grid, false);
grid.setSize(Math.max((Integer) gridSizeSpinner.getValue(), Grid.MIN_GRID_SIZE));
updateSecondDimension(grid, true);
grid.setOffset(getInt(gridOffsetXTextField, 0), getInt(gridOffsetYTextField, 0));
zone.setGridColor(colorWell.getColor().getRGB());
grid.setSize(Math.max((Integer) gridSizeSpinner.getValue(), Grid.MIN_GRID_SIZE));

renderer.repaint();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/rptools/maptool/model/Grid.java
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ public GridDto toDto() {
var dto = GridDto.newBuilder();
fillDto(dto);
dto.setOffsetX(offsetX);
dto.setOffsetX(offsetY);
dto.setOffsetY(offsetY);
dto.setSize(size);
if (cellShape != null) {
dto.setCellShape(Mapper.map(cellShape));
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/net/rptools/maptool/model/Token.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ public enum Update {
flipX,
flipY,
flipIso,
setSpeechName
setSpeechName,
removeFacing
}

public static final Comparator<Token> NAME_COMPARATOR =
Expand Down Expand Up @@ -2611,6 +2612,9 @@ public void updateProperty(Zone zone, Update update, List<TokenPropertyValueDto>
}
setFacing(parameters.get(0).getIntValue());
break;
case removeFacing:
setFacing(null);
break;
case clearAllOwners:
clearAllOwners();
panelLookChanged = true;
Expand Down
1 change: 1 addition & 0 deletions src/main/proto/data_transfer_objects.proto
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ enum TokenUpdateDto {
flipY = 52;
flipIso = 53;
setSpeechName = 54;
removeFacing = 55;
}

message AssetTransferHeaderDto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
</at>
<at name="name">@type.NPC</at>
<at name="width">45</at>
<at name="text">NPC</at>
<at name="text">Token.Type.NPC</at>
<at name="height">17</at>
</object>
</at>
Expand Down Expand Up @@ -457,7 +457,7 @@
</at>
<at name="name">@type.PC</at>
<at name="width">36</at>
<at name="text">PC</at>
<at name="text">Token.Type.PC</at>
<at name="height">17</at>
</object>
</at>
Expand Down

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions src/main/resources/net/rptools/maptool/language/i18n.properties
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,17 @@ EditTokenDialog.label.terrain.mod.tooltip= Adjust the cost of movement other tok
EditTokenDialog.label.image = Image Table:
EditTokenDialog.label.opacity = Token Opacity:
EditTokenDialog.label.opacity.tooltip = Change the opacity of the token.
EditTokenDialog.label.opacity.100 = 100%
EditTokenDialog.label.terrain.ignore = Ignore Terrain:
EditTokenDialog.label.terrain.ignore.tooltip= Select any terrain modifier types this token should ignore.
EditTokenDialog.combo.terrain.mod = Set whether the cell cost should be added or multiplied. Use negative numbers to subtract and decimal values to divide costs.
EditTokenDialog.border.title.layout = Layout
EditTokenDialog.border.title.portrait = Portrait
EditTokenDialog.border.title.handout = Handout
EditTokenDialog.border.title.charsheet = Charsheet
EditTokenDialog.status.layout.instructions = Mouse Wheel to zoom; double-LClick to reset position and zoom
EditTokenDialog.label.allplayers = All Players
EditTokenDialog.label.Ownership = ownerShipLabel
EditTokenDialog.tab.properties = Properties
EditTokenDialog.tab.vbl = Topology
EditTokenDialog.tab.state = State
Expand All @@ -293,19 +296,22 @@ EditTokenDialog.tab.ownership = Ownership
EditTokenDialog.tab.config = Config
EditTokenDialog.tab.hero = Hero Lab
EditTokenDialog.tab.libToken = Lib:Token properties
EditTokenDialog.table.properties = propertiesTable
EditTokenDialog.button.vbl = Generate Token Topology
EditTokenDialog.button.vbl.tooltip = This will create VBL/MBL based on non-transparent pixels.
EditTokenDialog.button.vbl.clear = Clear Token Topology
EditTokenDialog.button.vbl.clear.tooltip = Clear VBL/MBL from token.
EditTokenDialog.button.vbl.tomap = Move Topology To Map
EditTokenDialog.button.vbl.frommap = Move Topology From Map
EditTokenDialog.button.vbl.preview = VBL Preview
EditTokenDialog.option.vbl.erase = Erase Source Topology on Move
EditTokenDialog.option.vbl.erase.tooltip = Move the VBL/MBL vs Copy it.
EditTokenDialog.label.vbl.visiblity = Token Visibility
EditTokenDialog.label.vbl.tolerance = Visibility Tolerance
EditTokenDialog.label.vbl.preview = Hide Token Image Preview
EditTokenDialog.label.vbl.preview.tooltip= Do not generate a preview of the VBL/MBL in this window.
EditTokenDialog.label.vbl.sensitivity = Color Sensitivity
EditTokenDialog.label.vbl.sensitivity.tooltip = Adjust the sensitivity to the color match that will be used to generate VBL, values 0-255 with 0 being an exact color match.
EditTokenDialog.label.vbl.invert = Inverse Topology Color Selection
EditTokenDialog.label.vbl.invert.tooltip = Generate VBL/MBL where the color does not match on the token when checked.
EditTokenDialog.label.vbl.level = Level
Expand All @@ -322,6 +328,23 @@ EditTokenDialog.status.vbl.instructions = Mouse Wheel to zoom; double-LClick to
EditTokenDialog.label.hero.summary = Summary:
EditTokenDialog.label.hero.portfolio = Portfolio:
EditTokenDialog.label.hero.last = Last Modified:
EditTokenDialog.valueNotSet.hero.summary = summaryText
EditTokenDialog.valueNotSet.hero.portfolio = portfolioLocation
EditTokenDialog.valueNotSet.hero.last = lastModified
EditTokenDialog.button.hero.setAsTokenPortrait = Set as Token Portrait
EditTokenDialog.button.hero.setAsTokenImage = Set as Token Image
EditTokenDialog.button.hero.setAsTokenHandout = Set as Token Handout
EditTokenDialog.label.hero.isAlly = Ally?
EditTokenDialog.label.hero.statBlockSearch = Expression:
EditTokenDialog.button.hero.statBlockSearch.tooltip = Search the statblock using the expression provided.
EditTokenDialog.label.hero.statBlockSearch.tooltip = Enter raw text, a regular expression or an xPath expression to search the statblock for.
EditTokenDialog.label.hero.statBlockRTextScroll.text = textStatblockRTextScrollPane
EditTokenDialog.label.hero.statBlockRTextScroll.xml = xmlStatblockRTextScrollPane
EditTokenDialog.action.hero.statBlockRTextScroll = Find
EditTokenDialog.tab.hero.images = Images
EditTokenDialog.tab.hero.text = TEXT
EditTokenDialog.tab.hero.xml = XML
EditTokenDialog.tab.hero.html = HTML
EditTokenDialog.spinner.tolerance.tooltip= Sets the tolerance for the optimization, a value of 0 disables optimization and values > 0 reduce the number of polygon points for better performance.
EditTokenDialog.vbl.explanation.tooltip = <html>Controls how many of the tokens regions must be seen before showing over FoW, range is 1-9 regions.<br><br>The image is sliced into an even 3 x 3 grid for a total of 9 regions. The tolerance controls how many of these "regions" must be "seen" by another token before it's image is revealed.<br><br>For a very large roof, because of vision distance, you may want to use a value of 1.<br>Where as for a smaller token like a statue, you may not want to show the image until more of it is visable and use a value of 3 or 4.</html>
EditTokenDialog.confirm.clearSpeech = Are you sure you want to clear all speech for this token?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the Acholi translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the Czech translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the Danish translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the German translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down Expand Up @@ -635,8 +634,8 @@ Preferences.label.performance.cap = Kappungsgrenze der Bildrate
Preferences.label.performance.cap.tooltip = Kappungsgrenze der Bildrate der Kartendarstellung in FPS.
Preferences.label.performance.render = Bildskalierungsqualität
Preferences.label.performance.render.tooltip = Qualität skalierter Bilder.
Preferences.combo.render.low = Low (Fastest)
Preferences.combo.render.pixel = Pixel Art
Preferences.combo.render.low = Niedrig (Am schnellsten)
Preferences.combo.render.pixel = Pixelbild
Preferences.combo.render.medium = Mittel
Preferences.combo.render.high = Hoch (Am langsamsten)
Preferences.label.initiative.defaults = Kampagnen-Standards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the Spanish translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the French translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the Italian translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the Japanese translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
# See the file LICENSE elsewhere in this distribution for license details.
#_____________________________________________________________________
#
# This is the English translation file for MapTool 1.3. If you are
# translating MapTool to another language and leave out a translation
# for any key that appears here (the "key" is the text before the "=")
# then the values in this file will be used.
# This is the Dutch translation file for MapTool 1.3. If you leave
# out a translation for any key that appears here (the "key" is the
# text before the "=") then the English value will be used.
#
# Please submit all translations using the UTF-8 encoding! If you MUST
# use a different encoding, please document it INSIDE your translation
Expand Down

0 comments on commit ff19aa8

Please sign in to comment.