Giter Club home page Giter Club logo

i18n-complete's People

Contributors

dotnetwise avatar gblmarquez avatar steodor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

i18n-complete's Issues

Adding an empty message to the dictionary

Hello,

I have been testing i18n-Complete and in Localization you have:

public void LoadFromReader(TextReader reader)
{
  string line;
  Message message = new Message();
  NodeType lastNode = NodeType.WhiteSpace;
  while (null != (line = reader.ReadLine()))
  {
     if (String.IsNullOrEmpty(line)) {
       if (message.MsgID != "") {
         if (!Messages.ContainsKey(message.MsgID)) {
           Messages.Add(message.MsgID, message);
         }
         if (!MessagesByAutoID.ContainsKey(message.AutoID)) {
           MessagesByAutoID.Add(message.AutoID, message);
         }
  }
      message = new Message();
  continue;
   }
   NodeType node = GetNodeType(line);
}

Why do you test if line and MsgID are empty and in the end add a message.

Maybe I am wrong but I am ending with one extra message than the ones that exist in the po files ...

You shouldn't add that message to the dictionary or am I wrong?

Thank You,
Miguel

xgettext behaviour

Hi,

I didn't know where to put it else, so I open up an issue, althought its not exaclty an issue.

I started to use this amazing package and it works great.

However, I have two problems that, i think, have to do with xgettext.exe. And I don't find any documentation on the one used here (is it a modified one by you?)

  1. When I use umlauts in my key like @_("Gesamtfläche"), the umlaut gets stripped in the .po and I end up with "Gesamtflche".
  2. When I have a key inside an html attribute like img src="/Images/help.png" class="help" title="@_("Gesamtflche")" xgettext doesnt pick it up. So I don't have it in my PO files afterwards.

Especially point 2 is very important for me. Can I solve that somehow by altering the parameters for xgettext.exe ?
I can't find any documentation on the xgettext.exe that is used here, so I have to ask here.

Thank you very much in advance,
dga

Use using with StreamReader ..

Hello,

When loading a PO file you have:

public void LoadFromFile(string filepath) {
  LoadFromReader(new Strea mReader(filepath, Encoding.UTF8, true));
}

Shouldn't you use "using (StreamReader ...."

Thanks,
Miguel

Take advantage of Cache

Hello,

Wouldn't make sense to take advantage of Cache when loading PO files. Something like:

private string GetPOFile(string languageName) {
   if (HttpRuntime.Cache[languageName] != null)
   {
    return (string)HttpRuntime.Cache[languageName];
   }
   else
   {
    var fileContents = ReadPOFileFromDisk();
    HttpRuntime.Cache[languageName] = fileContents;
    return fileContents;
 }

}

Thank you,
Miguel

Create PO files

Hello,

Does I18NComplete has any class that generates POT or PO files?
I found a class in it, Localization, that parses a PO file but none that generates a PO file.

Thank You,
Miguel

Make sure LocalizationController is only deployed via nuget if it doesn't exist

Currently when you updated the I18NComplate.MVC4 nuget package, you'll get a prompt whether you want to rewrite the LocalizationController

Update the nuget install.ps1 file so that this file will only get deployed if it doesn't already exist.
Upon uninstall, only remove it if it matched the original file. Leave it there if it was being changed already.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.