(locale: Locale, pathname: string)
| 205 | } |
| 206 | |
| 207 | export function route(locale: Locale, pathname: string) { |
| 208 | const next = strip(pathname) |
| 209 | if (next.startsWith("/docs")) return docs(locale, next) |
| 210 | if (next.startsWith("/auth")) return next |
| 211 | if (next.startsWith("/workspace")) return next |
| 212 | if (locale === "en") return next |
| 213 | if (next === "/") return `/${locale}` |
| 214 | return `/${locale}${next}` |
| 215 | } |
| 216 | |
| 217 | export function label(locale: Locale) { |
| 218 | return LABEL[locale] |
no test coverage detected