Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improved i18n output

  • Loading branch information...
commit 61d69ddd752697f2d5268f14016a85221013186a 1 parent 0c6d898
@gastaldi gastaldi authored
View
7 dev-plugins/src/main/java/org/jboss/forge/dev/i18n/LsBundlePlugin.java
@@ -26,8 +26,10 @@
import javax.inject.Inject;
+import org.jboss.forge.resources.EntryResource;
import org.jboss.forge.resources.PropertiesFileResource;
import org.jboss.forge.resources.Resource;
+import org.jboss.forge.shell.ShellColor;
import org.jboss.forge.shell.Wait;
import org.jboss.forge.shell.plugins.Alias;
import org.jboss.forge.shell.plugins.DefaultCommand;
@@ -50,6 +52,7 @@
@Inject
private Wait wait;
+ @SuppressWarnings("unchecked")
@DefaultCommand
public void run(
@Option(description = "path", defaultValue = ".") final Resource<?>[] paths,
@@ -67,7 +70,9 @@ public void run(
PropertiesFileResource propResource = (PropertiesFileResource) path;
for (Resource<?> resource : propResource.listResources())
{
- out.println(resource.getName());
+ EntryResource<String, String> entryResource = (EntryResource<String, String>) resource;
+ out.print(ShellColor.BOLD, entryResource.getKey() + ": ");
+ out.println(entryResource.getValue());
}
out.println();
}
Please sign in to comment.
Something went wrong with that request. Please try again.