Skip to content

Commit

Permalink
Reworked the Error-messages
Browse files Browse the repository at this point in the history
  • Loading branch information
manuth committed Apr 3, 2017
1 parent 37cd0d5 commit 8f7d593
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
- Reworked the README
- Added [Checkbox-Support][MarkdownItCheckbox]

## 0.0.5
- Removed text-code

## 0.0.6
- Reworked the error-messages

<!--- References -->
[MarkdownItCheckbox]: https://www.npmjs.com/package/markdown-it-checkbox
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ It provides many features, such as DateTime-Formatting, configuring your own CSS

## Credits
- [ShiyumiChan][Shiyu] - thanks for borrowing your English-skills
- Yume for helping me a lot to create the [MarkdownConverter-Wiki][MarkdownConverterWiki]
- [Regexr.com][RegexR]
- [fullname]
- [node-html-pdf] and [vscode-markdown-pdf] these two projects were my inspiration
Expand All @@ -32,7 +33,7 @@ It provides many features, such as DateTime-Formatting, configuring your own CSS
]
}
```
2. Open up the command pallet (<kbd>Ctrl</kbd>, <kbd>Shift</kbd> + <kbd>P</kbd>) and search for `Markdown: Convert` (`Markdown: Konvertieren` in German) or `m conv` (`m k` in German) for short
2. Open up the command pallet (<kbd>Ctrl</kbd> + <kbd>P</kbd>) and search for `Markdown: Convert` (`Markdown: Konvertieren` in German) or `mco` (`mk` in German) for short
3. Press enter and wait for the process to finish

## Features and more
Expand Down
14 changes: 7 additions & 7 deletions src/Core/DateTimeFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export class DateTimeFormatter
private initializeTokens(date : Date, utc : boolean) : { [id : string] : string }
{
let tokens : { [id : string] : string } = {
ddd: this.localize(1).shortNames[date.getDay() + 1],
dddd: this.localize(1).fullNames[date.getDay() + 1],
MMM: this.localize(2).shortNames[date.getMonth()],
MMMM: this.localize(2).fullNames[date.getMonth()],
t: this.localize(3).shortNames[(date.getHours() < 12 ? 0 : 1)],
tt: this.localize(3).fullNames[(date.getHours() < 12 ? 0 : 1)]
ddd: this.localize(1, null).shortNames[date.getDay() + 1],
dddd: this.localize(1, null).fullNames[date.getDay() + 1],
MMM: this.localize(2, null).shortNames[date.getMonth()],
MMMM: this.localize(2, null).fullNames[date.getMonth()],
t: this.localize(3, null).shortNames[(date.getHours() < 12 ? 0 : 1)],
tt: this.localize(3, null).fullNames[(date.getHours() < 12 ? 0 : 1)]
}
return tokens;
}
Expand Down Expand Up @@ -89,7 +89,7 @@ export class DateTimeFormatter
{
case 'default':
case 'fullDate':
formatString = this.localize(0)[formatString];
formatString = this.localize(0, null)[formatString];
break;
}

Expand Down
6 changes: 3 additions & 3 deletions src/Program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class Program
converter.Start(type, destination);
window.showInformationMessage(localize(0 /* "SuccessMesage" */, null, ConversionType[type], destination), localize(1 /* "OpenFileLabel" */, null)).then((label) =>
{
if (label == localize(1, null))
if (label == localize(1 /* "OpenFileLabel" */, null))
{
ChildProcess.exec(Format('"{0}"', destination));
}
Expand All @@ -67,11 +67,11 @@ export class Program
{
if (e instanceof UnauthorizedAccessException)
{
message = localize(3 /* "UnauthorizedAccessException" */)
message = localize(3 /* "UnauthorizedAccessException" */, null, e.Path);
}
else if (e instanceof PhantomJSTimeoutException)
{
message = localize(4 /* "PhantomJSTimeoutException" */)
message = localize(4 /* "PhantomJSTimeoutException" */, null);
}
else
{
Expand Down

0 comments on commit 8f7d593

Please sign in to comment.