private String getI18nForMessage(ValuedTraitReference reference, String message) {
   String i18nedId =
       new TraitTypeInternationalizer(resources).getScreenName(reference.getTraitType());
   String name = reference.getName();
   if (name == null) {
     return i18nedId;
   }
   String subtraitNameKey = reference.getTraitType().getId() + "." + name;
   if (!resources.supportsKey(subtraitNameKey)) {
     return resources.getString(message, i18nedId, name);
   }
   String i18nedSubtraitName = resources.getString(subtraitNameKey);
   return resources.getString(message, i18nedId, i18nedSubtraitName);
 }
 public void addTool(
     final NewStatsConfiguration newStatsConfiguration,
     ToolListView<IEquipmentStats> statsListView) {
   final Tool newTool = statsListView.addTool();
   newTool.setTooltip(resources.getString(newStatsConfiguration.getTooltipKey()));
   newTool.setIcon(newStatsConfiguration.getIconPath());
   newTool.setOverlay(new RelativePath("icons/ButtonPlus16.png"));
   newTool.setCommand(
       () -> {
         List<String> definedNames =
             editModel
                 .getStats()
                 .stream()
                 .map(stats -> stats.getName().getId())
                 .collect(Collectors.toList());
         String nameProposal = resources.getString(newStatsConfiguration.getNameKey());
         IEquipmentStats equipmentStats =
             statsFactory.createNewStats(
                 definedNames, nameProposal, newStatsConfiguration.getType());
         editModel.addStatistics(equipmentStats);
       });
 }
 public void initPresentation() {
   for (SubEffect subeffect : model.getEffects()) {
     String key = model.getCharm().getName().text + ".Subeffects." + subeffect.getId();
     String label = resources.getString(key);
     BooleanView display = view.addSubeffect(label);
     subeffect.addChangeListener(() -> display.setSelected(subeffect.isLearned()));
     display.addChangeListener(
         newValue -> {
           subeffect.setLearned(newValue);
           display.setSelected(subeffect.isLearned());
         });
     display.setSelected(subeffect.isLearned());
   }
 }
 @Override
 public void addContent(PdfPTable table, Font font, IWeaponStats weapon) {
   if (weapon == null) {
     table.addCell(createEmptyNameCell(font));
   } else {
     Stream<Identifier> tags = weapon.getTags().stream();
     List<String> values =
         tags.filter(printedTags::contains)
             .map(input -> resources.getString("Weapons.Tags." + input.getId() + ".Short"))
             .collect(toList());
     String valueString = values.isEmpty() ? " " : Joiner.on(",").join(values);
     table.addCell(createFilledContentCell(font, valueString));
   }
 }
 private String getString(String resourceKey) {
   return resources.getString(resourceKey);
 }
 @Override
 public String getEssenceTitle() {
   return resources.getString("AdvantagesView.Essence.Title");
 }
 @Override
 public String getWillpowerTitle() {
   return resources.getString("AdvantagesView.Willpower.Title");
 }
 public TagsStatsGroup(Resources resources) {
   this.resources = resources;
   this.title = resources.getString("Sheet.Equipment.Header.Tags");
 }