Skip to content

Support localisation of description strings #80

@GoogleCodeExporter

Description

@GoogleCodeExporter
I want to return for the user, typed metadata. I basically go about it like 
this:

    for (Directory directory : metadata.getDirectories()) {
        for (Tag tag : directory.getTags()) {
            String key = tag.getDirectoryName() + ": " + tag.getTagName();
            Object value = directory.getObject(tag.getTagType());
            results.put(key, value);
        }
    }

My problem with this is twofold:

  1. Sometimes there are units and the units are crucial. For instance, I have an image here with IFD0 "X Resolution" of 204 dots per inch. getObject() returns (Rational) 2040000/10000 but now I have no way to get the units.

  2. Sometimes an integer is returned for enum-like values. IFD0 "Resolution Unit" is one such place - getObject() returns (Integer) 2 and the user looks at that and wonders what it means.

Background: The reason I'm trying to avoid TagDescriptor.getDescription() comes 
down to localisation. I don't want to index property values with English text 
in them if the user is Chinese. For this, it would be much easier if I could 
get a value and a unit separately and then worry about what to do about 
localising the units (ideally, what I store into our database should not be 
localised at all, so that multiple users can each see their own language when 
looking at the data.)

Original issue reported on code.google.com by trejkaz on 28 May 2013 at 2:05

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions