1 import { c, msgid } from 'ttag';
3 export const getServersInWithoutPlus = (numberOfServers: string, numberOfCountries: number) => {
4 // translator: numberOfServers is a string that looks like `20 servers`. It has been pluralized earlier.
5 return c('VPN Plan Feature').ngettext(
6 msgid`${numberOfServers} in ${numberOfCountries} country`,
7 `${numberOfServers} in ${numberOfCountries} countries`,
12 export const getServersIn = (numberOfServers: string, numberOfCountries: number) => {
13 // translator: numberOfServers is a string that looks like `1300+ servers`, It has been pluralized earlier.
14 return c('VPN Plan Feature').ngettext(
15 msgid`${numberOfServers} across ${numberOfCountries} country`,
16 `${numberOfServers} across ${numberOfCountries}+ countries`,
21 export const getVpnConnections = (n = 0) => {
22 return c('VPN Plan Feature').ngettext(msgid`${n} VPN connection`, `${n} VPN connections`, n);
25 export const getVpnServers = (n = 0) => {
26 return c('VPN Plan Feature').ngettext(msgid`${n} server`, `${n}+ servers`, n);
29 export const getVpnServersWithoutPlus = (n = 0) => {
30 return c('VPN Plan Feature').ngettext(msgid`${n} server`, `${n} servers`, n);
33 export const getPlusServers = (servers = 1300, countries = 0) => {
34 return getServersIn(getVpnServers(servers), countries);
37 export const getBasicServers = (servers = 350, countries = 0) => {
38 return getServersIn(getVpnServers(servers), countries);
41 export const getFreeServers = (servers = 0, countries = 0) => {
42 return getServersInWithoutPlus(getVpnServersWithoutPlus(servers), countries);