dotnetwise / i18n-complete Goto Github PK
View Code? Open in Web Editor NEWASP.NET MVC & Javascript localization done right
ASP.NET MVC & Javascript localization done right
I´m not able to find license information about i18n-Complete.
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
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
Hello,
I notest that comments are not being added to the dictionary even when LoadComments is true ... any reason for this?
Thank You,
Miguel
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
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
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.
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?)
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.