@docsector/docsector-reader 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -59,6 +59,7 @@ Transform Markdown content into beautiful, navigable documentation sites — wit
59
59
  - 🧭 **Robust Edit Link Mapping** — Normalizes route paths (including trailing slashes) into `page.subpage.locale.md` source files for reliable GitHub edit URLs
60
60
  - 📅 **Last Updated Date** — Automatic per-page "last updated" date from git commit history, locale-formatted
61
61
  - 📊 **Translation Progress** — Automatic translation percentage based on header coverage
62
+ - 🌐 **Accurate Available Translations** — Locale availability counter now uses actual localized page source presence, avoiding false negatives when metadata is equal
62
63
  - 🧠 **Markdown Negotiation** — Responds with Markdown when clients send `Accept: text/markdown`, while keeping HTML as browser default
63
64
  - 🔐 **Web Bot Auth** — Can publish a signed HTTP message signatures directory and includes helpers to sign outbound bot requests
64
65
  - 🧭 **Content Signals** — Injects `Content-Signal` policy in `robots.txt` with deterministic, idempotent build output
package/bin/docsector.js CHANGED
@@ -23,7 +23,7 @@ const packageRoot = resolve(__dirname, '..')
23
23
  const args = process.argv.slice(2)
24
24
  const command = args[0]
25
25
 
26
- const VERSION = '2.0.3'
26
+ const VERSION = '2.0.5'
27
27
 
28
28
  const HELP = `
29
29
  Docsector Reader v${VERSION}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docsector/docsector-reader",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "A documentation rendering engine built with Vue 3, Quasar v2 and Vite. Transform Markdown into beautiful, navigable documentation sites.",
5
5
  "productName": "Docsector Reader",
6
6
  "author": "Rodrigo de Araujo Vieira",
@@ -107,23 +107,25 @@ const progress = computed(() => {
107
107
 
108
108
  const languages = computed(() => {
109
109
  const i18nPathAbsolute = store.state.i18n.absolute
110
- const translations = pageValueI18nPath(i18nPathAbsolute, '_translations')
111
110
  const i18nLocales = availableLocales
112
- let fallbackLastUpdated = null
111
+ const sourcePath = pageValueI18nPath(i18nPathAbsolute, 'source')
113
112
 
114
- if (te(translations, 'en-US')) {
115
- fallbackLastUpdated = tm(translations, 'en-US')
113
+ if (!i18nPathAbsolute || i18nLocales.length === 0) {
114
+ return `0/${i18nLocales.length}`
116
115
  }
117
116
 
118
117
  let i18nLocalesAvailable = 0
119
- if (fallbackLastUpdated) {
120
- for (let i = 0; i < i18nLocales.length; i++) {
121
- if (t(translations, i18nLocales[i]) !== fallbackLastUpdated) {
122
- i18nLocalesAvailable++
123
- }
118
+ for (let i = 0; i < i18nLocales.length; i++) {
119
+ const currentLocale = i18nLocales[i]
120
+
121
+ if (!te(sourcePath, currentLocale)) {
122
+ continue
123
+ }
124
+
125
+ const source = tm(sourcePath, currentLocale)
126
+ if (typeof source === 'string' && source.trim().length > 0) {
127
+ i18nLocalesAvailable++
124
128
  }
125
- } else {
126
- i18nLocalesAvailable = 1
127
129
  }
128
130
 
129
131
  return `${i18nLocalesAvailable}/${i18nLocales.length}`
@@ -18,6 +18,8 @@
18
18
  <q-btn class="filled" square icon="settings" aria-label="Configuration" @click="openSettingsDialog" />
19
19
  </q-toolbar>
20
20
 
21
+ <q-separator v-if="sortedBooks.length > 0" class="d-book-tabs-separator" dark />
22
+
21
23
  <q-tabs
22
24
  v-if="sortedBooks.length > 0"
23
25
  :model-value="activeBookTab"
@@ -328,6 +330,8 @@ store.commit('page/resetAnchors')
328
330
  padding: 0
329
331
  .q-tabs
330
332
  margin-top: 2px
333
+ .d-book-tabs-separator
334
+ opacity: 0.25
331
335
  .d-book-tabs
332
336
  .q-tab__indicator
333
337
  background-color: currentColor