Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tr localize #2078

Closed
vefacaglar opened this issue Jun 13, 2019 · 1 comment
Closed

tr localize #2078

vefacaglar opened this issue Jun 13, 2019 · 1 comment

Comments

@vefacaglar
Copy link
Contributor

vefacaglar commented Jun 13, 2019

Feature Request

hi, tr localization is not enough. i detailed tr-TR.js file for more detail in turkish language. could you update tr-TR.js file.

function xMinutesAgo(dateStr) {
  const date = new Date(dateStr);
  const dateTime = date.getTime();

  if (isNaN(dateTime)) {
    return dateStr;
  }

  const now = Date.now();
  const deltaInMs = now - dateTime;
  const deltaInMinutes = Math.floor(deltaInMs / 60000);
  const deltaInHours = Math.floor(deltaInMs / 3600000);

  if (deltaInMinutes < 1) {
    return 'Şimdi';
  } else if (deltaInMinutes === 1) {
    return 'Bir dakika önce';
  } else if (deltaInHours < 1) {
    return `${deltaInMinutes} dakika önce`;
  } else if (deltaInHours === 1) {
    return `Bir saat önce`;
  } else if (deltaInHours < 5) {
    return `${deltaInHours} saat önce`;
  } else if (deltaInHours <= 24) {
    return `Bugün`;
  } else if (deltaInHours <= 48) {
    return `Dün`;
  } else if (window.Intl) {
    return new Intl.DateTimeFormat('tr-TR').format(date);
  }

  return date.toLocaleString('tr-TR', {
    day: '2-digit',
    hour: '2-digit',
    hour12: false,
    minute: '2-digit',
    month: '2-digit',
    year: 'numeric'
  });
}

export default {
  FAILED_CONNECTION_NOTIFICATION: 'Bağlanamadı.',
  INITIAL_CONNECTION_NOTIFICATION: 'Bağlanıyor…',
  INTERRUPTED_CONNECTION_NOTIFICATION: 'Ağ kesintisi meydana geldi. Yeniden bağlanıyor...',
  // Do not localize {Retry}; it is a placeholder for "Retry". English translation should be, "Send failed. Retry."
  SEND_FAILED_KEY: `gönderilemedi, {Retry}.`,
  SLOW_CONNECTION_NOTIFICATION: 'Bağlantı hızı çok düşük.',
  Chat: 'Sohbet',
  'Download file': 'Dosyayı indir',
  'Microphone off': 'Mikrofon kapalı',
  'Microphone on': 'Mikrofon açık',
  'X minutes ago': xMinutesAgo,
  'Listening…': 'Dinliyor…',
  Retry: 'yeniden deneyin',
  Send: 'Gönder',
  Sending: 'gönderiliyor',
  // 'Speak': '',
  'Starting…': 'Başlıyor...',
  Tax: 'Vergi',
  Total: 'Toplam',
  'Type your message': 'İletinizi yazın',
  // 'Upload file': '',
  VAT: 'KDV'
};
@corinagum
Copy link
Contributor

Hi @vefacaglar, thank you for the work! We welcome PR's from the community so it would be great if you could take a look at our Contributing Guidelines and submit a PR. Since Microsoft requires contributors to sign an SLA, it will be necessary for you to do so before I can accept your changes. Please add your username to LOCALIZATION.md and CHANGELOG.md as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants