Skip to content

Commit d705551

Browse files
committed
docs: add comprehensive documentation and changelog
- Add CHANGELOG.md with initial release details - Add I18N.md guide for internationalization support - Add NOTIFICATIONS.md API guide for notification system - Add STATUSBAR.md API guide for status bar integration - Add WORKFLOW.md practical workflow guide - Add SCREENSHOTS.md scaffold for visual documentation - Complete documentation coverage to match string-le quality level
1 parent 3059b27 commit d705551

File tree

6 files changed

+1238
-0
lines changed

6 files changed

+1238
-0
lines changed

CHANGELOG.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Changelog
2+
3+
All notable changes to Dates-LE will be documented here.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2025-01-27
9+
10+
### ✨ Initial Release
11+
12+
**Dates-LE** - Extract and analyze dates from various file formats including logs, configuration files, and code.
13+
14+
#### **Core Functionality**
15+
16+
- **Multi-format support**: Logs, JSON, YAML, JavaScript, TypeScript, CSV, configuration files
17+
- **One-command extraction**: `Ctrl+Alt+D` (`Cmd+Alt+D` on macOS) or Command Palette
18+
- **Multiple access methods**: Context menu, status bar, Quick Fix (Code Actions)
19+
20+
#### **Advanced Features**
21+
22+
- **Complete date detection**: ISO 8601, RFC 2822, Unix timestamps, custom formats
23+
- **Smart analysis & insights**: Date patterns, frequency analysis, anomaly detection
24+
- **Timezone awareness**: Multiple timezone support and conversion
25+
- **Performance optimized**: Handles large files efficiently with intelligent parsing
26+
27+
#### **Enterprise Ready**
28+
29+
- **English localization**: Full internationalization support
30+
- **Virtual workspace support**: Compatible with GitHub Codespaces, Gitpod
31+
- **Untrusted workspace handling**: Safe operation in restricted environments
32+
- **Comprehensive configuration**: 30+ settings for fine-grained control
33+
34+
#### **Safety & Performance**
35+
36+
- **Safety guardrails**: Warnings for large files and operations
37+
- **Memory management**: Optimized processing with configurable limits
38+
- **Error handling**: Graceful recovery from parsing errors
39+
- **Performance monitoring**: Built-in performance tracking and optimization
40+
41+
#### **Analysis Features**
42+
43+
- **Pattern analysis**: Identifies common date patterns and formats
44+
- **Range analysis**: Analyzes date ranges and intervals
45+
- **Anomaly detection**: Detects future dates, invalid dates, duplicates, outliers
46+
- **Frequency distribution**: Analyzes date frequency and distribution patterns
47+
- **Temporal relationships**: Identifies temporal relationships between dates
48+
49+
#### **Conversion Features**
50+
51+
- **Format conversion**: Converts between different date formats
52+
- **Timezone conversion**: Converts dates between different timezones
53+
- **Locale support**: Formats dates according to different locales
54+
- **Custom formats**: Supports custom date format specifications
55+
56+
#### **Output Formats**
57+
58+
- **Multiple formats**: ISO 8601, RFC 2822, Unix timestamp, UTC, local, original
59+
- **Custom formatting**: Configurable output with position and context
60+
- **Deduplication**: Automatic removal of duplicate dates
61+
- **Sorting options**: Multiple sorting modes (chronological, frequency, format)
62+
63+
#### **Integration Features**
64+
65+
- **VS Code integration**: Command palette, context menu, status bar
66+
- **Keyboard shortcuts**: Configurable shortcuts for all commands
67+
- **Settings UI**: Integrated settings interface
68+
- **Telemetry**: Optional local-only performance tracking
69+
70+
#### **Developer Experience**
71+
72+
- **TypeScript**: Strict TypeScript configuration with comprehensive types
73+
- **Testing**: Unit tests for core functionality
74+
- **Documentation**: Comprehensive documentation and troubleshooting guides
75+
- **Performance**: Optimized for large files and complex date extraction scenarios
76+
77+
#### **Supported Date Formats**
78+
79+
- **Standard formats**: ISO 8601, RFC 2822, Unix timestamps, UTC strings, local strings
80+
- **Custom formats**: Configurable pattern matching for specific date formats
81+
- **Timezone formats**: Multiple timezone representations and conversions
82+
- **Locale formats**: Locale-specific date formatting and parsing

docs/I18N.md

Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
# Dates-LE Internationalization (I18N) Guide
2+
3+
## Goals and philosophy
4+
5+
- Inclusive by default: all user‑facing text is localizable.
6+
- Privacy‑first and offline: no network calls; translations ship with the extension.
7+
- Predictable keys: two namespaces — `manifest.*` for `package.json` UI and `runtime.*` for in‑code strings.
8+
- Safe fallbacks: English is bundled and used when a key or locale is missing.
9+
- Translator‑friendly: consistent placeholders, small focused sentences, and a source `language.json` catalogue.
10+
11+
Non‑goals:
12+
- Remote translation fetching or telemetry.
13+
- Complex runtime pluralization logic. We use positional `{0}` placeholders with `vscode-nls`.
14+
15+
---
16+
17+
## File layout
18+
19+
```
20+
src/i18n/
21+
package.nls.json # Base English strings for package.json
22+
runtime.json # Runtime strings for in-code messages
23+
package.nls.de.json # German translations
24+
package.nls.es.json # Spanish translations
25+
package.nls.fr.json # French translations
26+
package.nls.id.json # Indonesian translations
27+
package.nls.it.json # Italian translations
28+
package.nls.ja.json # Japanese translations
29+
package.nls.ko.json # Korean translations
30+
package.nls.ru.json # Russian translations
31+
package.nls.uk.json # Ukrainian translations
32+
package.nls.vi.json # Vietnamese translations
33+
package.nls.zh-cn.json # Chinese (Simplified) translations
34+
```
35+
36+
---
37+
38+
## Key namespaces
39+
40+
### `manifest.*` keys (package.json UI)
41+
42+
Used for VS Code extension manifest strings:
43+
44+
```json
45+
{
46+
"manifest.ext.name": "Dates-LE",
47+
"manifest.ext.description": "Extract and analyze dates from various file formats including logs, configuration files, and code",
48+
"manifest.command.category": "Dates-LE",
49+
"manifest.command.extract.title": "Extract Dates",
50+
"manifest.command.convert.title": "Convert Date Formats",
51+
"manifest.command.analyze.title": "Analyze Dates",
52+
"manifest.settings.title": "Dates-LE Settings"
53+
}
54+
```
55+
56+
### `runtime.*` keys (in-code messages)
57+
58+
Used for dynamic messages, errors, and user feedback:
59+
60+
```json
61+
{
62+
"runtime.extract.no-editor": "No active editor found",
63+
"runtime.extract.progress": "Extracting dates...",
64+
"runtime.extract.success": "Extracted {0} dates",
65+
"runtime.error.parsing": "Parsing error",
66+
"runtime.error.validation": "Validation error"
67+
}
68+
```
69+
70+
---
71+
72+
## Usage in code
73+
74+
### Package.json localization
75+
76+
Reference keys in `package.json` using `%key%` syntax:
77+
78+
```json
79+
{
80+
"commands": [
81+
{
82+
"command": "dates-le.extractDates",
83+
"title": "%manifest.command.extract.title%",
84+
"category": "%manifest.command.category%"
85+
}
86+
],
87+
"configuration": {
88+
"title": "%manifest.settings.title%",
89+
"properties": {
90+
"dates-le.enabled": {
91+
"description": "%manifest.settings.enabled.desc%"
92+
}
93+
}
94+
}
95+
}
96+
```
97+
98+
### Runtime localization
99+
100+
Use `vscode-nls` for runtime messages:
101+
102+
```typescript
103+
import * as nls from 'vscode-nls'
104+
105+
const localize = nls.config({ messageFormat: nls.MessageFormat.file })()
106+
107+
// Simple message
108+
const message = localize('runtime.extract.no-editor', 'No active editor found')
109+
110+
// Message with parameters
111+
const successMessage = localize('runtime.extract.success', 'Extracted {0} dates', count)
112+
113+
// Error message
114+
const errorMessage = localize('runtime.error.parsing', 'Parsing error: {0}', errorDetails)
115+
```
116+
117+
---
118+
119+
## Translation guidelines
120+
121+
### Key naming conventions
122+
123+
- Use descriptive, hierarchical names: `manifest.settings.extraction.includeComments.desc`
124+
- Keep keys under 50 characters when possible
125+
- Use consistent terminology across all translations
126+
- Group related keys together
127+
128+
### Message formatting
129+
130+
- Use `{0}`, `{1}`, `{2}` for positional parameters
131+
- Keep messages concise and clear
132+
- Avoid technical jargon when possible
133+
- Use consistent punctuation and capitalization
134+
135+
### Example translation
136+
137+
**English (base)**:
138+
```json
139+
{
140+
"manifest.settings.extraction.includeComments.desc": "Include dates found in comments and documentation",
141+
"runtime.extract.success": "Extracted {0} dates from {1} file"
142+
}
143+
```
144+
145+
**German translation**:
146+
```json
147+
{
148+
"manifest.settings.extraction.includeComments.desc": "Daten in Kommentaren und Dokumentation einbeziehen",
149+
"runtime.extract.success": "{0} Daten aus {1} Datei extrahiert"
150+
}
151+
```
152+
153+
---
154+
155+
## Adding new translations
156+
157+
### 1. Add keys to base files
158+
159+
Add new keys to `src/i18n/package.nls.json` and `src/i18n/runtime.json`:
160+
161+
```json
162+
{
163+
"manifest.settings.newFeature.desc": "Description of new feature",
164+
"runtime.newFeature.success": "New feature completed successfully"
165+
}
166+
```
167+
168+
### 2. Update package.json
169+
170+
Reference the new keys in `package.json`:
171+
172+
```json
173+
{
174+
"configuration": {
175+
"properties": {
176+
"dates-le.newFeature": {
177+
"description": "%manifest.settings.newFeature.desc%"
178+
}
179+
}
180+
}
181+
}
182+
```
183+
184+
### 3. Use in code
185+
186+
Add runtime usage:
187+
188+
```typescript
189+
const message = localize('runtime.newFeature.success', 'New feature completed successfully')
190+
```
191+
192+
### 4. Add translations
193+
194+
Create or update translation files for each supported language:
195+
196+
```json
197+
{
198+
"manifest.settings.newFeature.desc": "Beschreibung der neuen Funktion",
199+
"runtime.newFeature.success": "Neue Funktion erfolgreich abgeschlossen"
200+
}
201+
```
202+
203+
---
204+
205+
## Testing translations
206+
207+
### Local testing
208+
209+
1. Set VS Code locale: `Ctrl+Shift+P` → "Configure Display Language"
210+
2. Restart VS Code
211+
3. Test extension functionality
212+
4. Verify all strings are translated
213+
214+
### Translation validation
215+
216+
- Check for missing keys in translation files
217+
- Verify parameter placeholders match between languages
218+
- Test with different locales and fallback scenarios
219+
- Ensure consistent terminology across all languages
220+
221+
---
222+
223+
## Future enhancements
224+
225+
### Planned features
226+
227+
- **Portuguese (Brazil) support**: `package.nls.pt-br.json`
228+
- **Additional languages**: Based on user demand and community contributions
229+
- **Translation validation**: Automated checks for missing keys and parameter mismatches
230+
- **Community contributions**: Guidelines for external translation contributions
231+
232+
### Contributing translations
233+
234+
1. Fork the repository
235+
2. Add translation files for your language
236+
3. Test thoroughly with the target locale
237+
4. Submit a pull request with translation files and test results
238+
239+
---
240+
241+
## Troubleshooting
242+
243+
### Common issues
244+
245+
**Missing translations**
246+
- Check that translation files are in the correct location
247+
- Verify key names match exactly between base and translation files
248+
- Ensure VS Code is restarted after adding new translations
249+
250+
**Parameter mismatches**
251+
- Verify `{0}`, `{1}`, etc. placeholders are consistent
252+
- Test with different parameter values
253+
- Check for proper escaping of special characters
254+
255+
**Fallback behavior**
256+
- English strings are used when translations are missing
257+
- Check VS Code locale settings
258+
- Verify translation files are properly formatted JSON
259+
260+
### Debug tips
261+
262+
- Use VS Code Developer Tools to inspect localized strings
263+
- Check the Output panel for i18n-related errors
264+
- Test with different VS Code locales to verify fallback behavior
265+
- Use browser dev tools to inspect DOM for localized content

0 commit comments

Comments
 (0)