fix(ui): apply sentence case to provider labels (#63)

* fix: address reviewbot feedback and update tests

Align request handling with Obsidian requestUrl and clean up UI text/lint directives while updating tests for the new mocks.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* chore: ignore release_log.txt

Add release_log.txt to gitignore to keep local release logs out of version control.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: align requesturl handling with review feedback

centralize requesturl availability errors, bind provider defaults once, and stabilize timeout test.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: address reviewbot required issues

Normalize UI sentence case and tighten error/string handling to satisfy Obsidian reviewbot checks.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(ui): restore brand casing in settings

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix(ui): apply sentence case to provider labels

Align provider labels and descriptions with sentence case rules and add updated Obsidian review notes.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
asyouplz 2026-02-03 15:32:17 +09:00 committed by GitHub
parent e544a0fb1f
commit 3645309b5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 419 additions and 25 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -392,8 +392,8 @@ export class EnhancedSettingsTab extends PluginSettingTab {
.setDesc('Select the transcription service provider')
.addDropdown((dropdown) => {
dropdown
.addOption('openai', 'OpenAI Whisper')
.addOption('azure', 'Azure Speech Services')
.addOption('openai', 'OpenAI whisper')
.addOption('azure', 'Azure speech services')
.addOption('custom', 'Custom endpoint');
void this.settingsAPI.get('api').then((api) => {

View file

@ -152,7 +152,7 @@ export class SettingsTab extends PluginSettingTab {
dropdown
.addOption('auto', 'Auto (intelligent selection)')
.addOption('whisper', 'OpenAI Whisper')
.addOption('whisper', 'OpenAI whisper')
.addOption('deepgram', 'Deepgram')
.setValue(this.plugin.settings.provider || 'auto')
.onChange(async (value) => {
@ -366,7 +366,7 @@ export class SettingsTab extends PluginSettingTab {
private renderWhisperApiKey(containerEl: HTMLElement): void {
new Setting(containerEl)
.setName('OpenAI API key')
.setDesc('Enter your OpenAI API key for Whisper transcription')
.setDesc('Enter your OpenAI API key for whisper transcription')
.addText((text) => {
text.setPlaceholder('Sk-...')
.setValue(this.maskApiKey(this.plugin.settings.apiKey || ''))
@ -439,7 +439,7 @@ export class SettingsTab extends PluginSettingTab {
const descriptions = {
auto: '🤖 Intelligent selection between providers based on your configured strategy. Automatically chooses the best provider for each request.',
whisper:
'🎯 OpenAI Whisper - high-quality transcription with support for multiple languages. Best for general-purpose transcription.',
'🎯 OpenAI whisper - high-quality transcription with support for multiple languages. Best for general-purpose transcription.',
deepgram:
'⚡ Deepgram - fast, accurate transcription with advanced AI features. Best for real-time processing and speaker diarization.',
};
@ -524,7 +524,7 @@ export class SettingsTab extends PluginSettingTab {
if (provider === 'whisper' || provider === 'auto') {
new Setting(containerEl)
.setName('Whisper model')
.setDesc('Select the Whisper model to use')
.setDesc('Select the whisper model to use')
.addDropdown((dropdown) =>
dropdown
.addOption('whisper-1', 'Whisper v1 (default)')

View file

@ -39,7 +39,7 @@ export class SimpleSettingsTab extends PluginSettingTab {
this.debug('Adding options to dropdown...');
dropdown
.addOption('auto', 'Auto (intelligent selection)')
.addOption('whisper', 'OpenAI Whisper')
.addOption('whisper', 'OpenAI whisper')
.addOption('deepgram', 'Deepgram')
.setValue(this.plugin.settings.provider || 'auto')
.onChange(async (value) => {
@ -62,7 +62,7 @@ export class SimpleSettingsTab extends PluginSettingTab {
if (provider === 'auto' || provider === 'whisper') {
new Setting(containerEl)
.setName('OpenAI API key')
.setDesc('Enter your OpenAI API key for Whisper')
.setDesc('Enter your OpenAI API key for whisper')
.addText((text) =>
text
.setPlaceholder('Sk-...')

View file

@ -81,7 +81,7 @@ export class ProviderSettings {
.addDropdown((dropdown) => {
dropdown
.addOption('auto', '🤖 Automatic (recommended)')
.addOption('whisper', '🎯 OpenAI Whisper')
.addOption('whisper', '🎯 OpenAI whisper')
.addOption('deepgram', '🚀 Deepgram')
.setValue(this.currentProvider)
.onChange(async (value) => {
@ -306,7 +306,7 @@ export class ProviderSettings {
private renderABTestDetails(containerEl: HTMLElement): void {
new Setting(containerEl)
.setName('Traffic split')
.setDesc('Percentage of requests to send to Whisper vs Deepgram')
.setDesc('Percentage of requests to send to whisper vs Deepgram')
.addSlider((slider) => {
const currentSplit = this.plugin.settings.abTestSplit || 50;
@ -574,7 +574,7 @@ export class ProviderSettings {
private showProviderInfo(provider: string): void {
const info: Record<string, string> = {
auto: '🤖 System will automatically select the best provider based on performance and availability',
whisper: '🎯 OpenAI Whisper - high accuracy, supports 50+ languages',
whisper: '🎯 OpenAI whisper - high accuracy, supports 50+ languages',
deepgram: '🚀 Deepgram - fast real-time transcription with excellent accuracy',
};
@ -601,7 +601,7 @@ export class ProviderSettings {
*/
private getProviderDisplayName(provider: TranscriptionProvider): string {
const names: Record<TranscriptionProvider, string> = {
whisper: 'OpenAI Whisper',
whisper: 'OpenAI whisper',
deepgram: 'Deepgram',
};
return names[provider] || provider;

View file

@ -195,7 +195,7 @@ export class ProviderSettingsContainer {
.addDropdown((dropdown) => {
dropdown
.addOption('auto', '🤖 Automatic (recommended)')
.addOption('whisper', '🎯 OpenAI Whisper only')
.addOption('whisper', '🎯 OpenAI whisper only')
.addOption('deepgram', '🚀 Deepgram only')
.setValue(this.currentProvider)
.onChange(async (value) => {
@ -358,7 +358,7 @@ export class ProviderSettingsContainer {
*/
private getProviderDisplayName(provider: string): string {
const names: Record<string, string> = {
whisper: 'OpenAI Whisper',
whisper: 'OpenAI whisper',
deepgram: 'Deepgram',
auto: 'Automatic',
};
@ -400,7 +400,7 @@ export class ProviderSettingsContainer {
private showProviderNotice(provider: string): void {
const messages: Record<string, string> = {
auto: '🤖 System will automatically select the best provider',
whisper: '🎯 Using OpenAI Whisper exclusively',
whisper: '🎯 Using OpenAI whisper exclusively',
deepgram: '🚀 Using Deepgram exclusively',
};
new Notice(messages[provider] || 'Provider updated');
@ -427,7 +427,7 @@ export class ProviderSettingsContainer {
],
},
{
title: '🎯 OpenAI Whisper',
title: '🎯 OpenAI whisper',
bullets: [
'Excellent accuracy for 50+ languages',
'Best for long-form content',
@ -438,7 +438,7 @@ export class ProviderSettingsContainer {
title: '🚀 Deepgram',
bullets: [
'Ultra-fast real-time transcription',
'Lower latency than Whisper',
'Lower latency than whisper',
'Cost-effective for high volume',
],
},
@ -776,7 +776,7 @@ class ProviderDetailsModal extends Modal {
}
private getProviderName(): string {
return this.provider === 'whisper' ? 'OpenAI Whisper' : 'Deepgram';
return this.provider === 'whisper' ? 'OpenAI whisper' : 'Deepgram';
}
private renderStatus(containerEl: HTMLElement): void {

View file

@ -287,7 +287,7 @@ export class ProviderSettingsContainerRefactored extends BaseSettingsComponent {
).addDropdown((dropdown) => {
dropdown
.addOption('auto', '🤖 Automatic')
.addOption('whisper', '🎯 OpenAI Whisper')
.addOption('whisper', '🎯 OpenAI whisper')
.addOption('deepgram', '🚀 Deepgram')
.setValue(this.state.get().currentProvider)
.onChange((value) => {
@ -567,7 +567,7 @@ export class ProviderSettingsContainerRefactored extends BaseSettingsComponent {
*/
private getProviderDisplayName(provider: string): string {
const names: Record<string, string> = {
whisper: 'OpenAI Whisper',
whisper: 'OpenAI whisper',
deepgram: 'Deepgram',
auto: '자동',
};
@ -828,7 +828,7 @@ class ProviderDetailsModal extends Modal {
}
private getProviderName(): string {
return this.provider === 'whisper' ? 'OpenAI Whisper' : 'Deepgram';
return this.provider === 'whisper' ? 'OpenAI whisper' : 'Deepgram';
}
private createStatusContent(): HTMLElement {

View file

@ -81,7 +81,7 @@ export class APIKeyManager {
inputsEl,
'whisper',
'OpenAI API key',
'Your OpenAI API key for Whisper',
'Your OpenAI API key for whisper',
'sk-...',
/^sk-[A-Za-z0-9]{48,}$/
);
@ -684,7 +684,7 @@ export class APIKeyManager {
* Provider
*/
private getProviderName(provider: TranscriptionProvider): string {
return provider === 'whisper' ? 'OpenAI Whisper' : 'Deepgram';
return provider === 'whisper' ? 'OpenAI whisper' : 'Deepgram';
}
/**
@ -806,7 +806,7 @@ export class APIKeyManager {
const whisperItem = envList.createEl('li');
whisperItem.createEl('code', { text: 'OPENAI_API_KEY' });
whisperItem.appendText(' for Whisper');
whisperItem.appendText(' for whisper');
const deepgramItem = envList.createEl('li');
deepgramItem.createEl('code', { text: 'DEEPGRAM_API_KEY' });

View file

@ -66,7 +66,7 @@ export class APIKeyManagerRefactored extends BaseSettingsComponent {
[
'whisper',
{
name: 'OpenAI Whisper',
name: 'OpenAI whisper',
placeholder: 'sk-...',
pattern: /^sk-[A-Za-z0-9]{48,}$/,
validateEndpoint: 'https://api.openai.com/v1/models',