Skip to content

Commit

Permalink
Change "Recent Files" to "Recent Databases" (JabRef#2103)
Browse files Browse the repository at this point in the history
* Change recent files to recent databases

* localizationUpdate

* describe changes in CHANGELOG.md

* localization update

* Fix internal qs comments

* Add old translation to the new key
  • Loading branch information
mairdl authored and zesaro committed Oct 27, 2016
1 parent 99ccad3 commit c1215c8
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- Complete vietnam language translation in menu
- Generalize German translation of database into "Datenbank"
- Improve language quality of the German translation of shared database
- Change "Recent files" to "Recent databases" to keep the file menu consistent

### Fixed
- Fixed [#1993](https://github.com/JabRef/jabref/issues/1993): Various optimizations regarding search performance
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/sf/jabref/gui/menus/FileHistoryMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class FileHistoryMenu extends JMenu implements ActionListener {


public FileHistoryMenu(JabRefPreferences prefs, JabRefFrame frame) {
String name = Localization.menuTitle("Recent files");
String name = Localization.menuTitle("Recent databases");
int i = name.indexOf('&');
if (i >= 0) {
setText(name.substring(0, i) + name.substring(i + 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public class JabRefPreferences {
public static final String OVERRIDE_DEFAULT_FONTS = "overrideDefaultFonts";
public static final String FONT_SIZE = "fontSize";
public static final String FONT_STYLE = "fontStyle";
public static final String RECENT_FILES = "recentFiles";
public static final String RECENT_DATABASES = "recentDatabases";
public static final String RENAME_ON_MOVE_FILE_TO_FILE_DIR = "renameOnMoveFileToFileDir";
public static final String MEMORY_STICK_MODE = "memoryStickMode";
public static final String DEFAULT_OWNER = "defaultOwner";
Expand Down Expand Up @@ -537,7 +537,7 @@ private JabRefPreferences() {
}
defaults.put(PUSH_TO_APPLICATION, "TeXstudio");

defaults.put(RECENT_FILES, "");
defaults.put(RECENT_DATABASES, "");
defaults.put(EXTERNAL_FILE_TYPES, "");
defaults.put(KEY_PATTERN_REGEX, "");
defaults.put(KEY_PATTERN_REPLACEMENT, "");
Expand Down Expand Up @@ -1380,12 +1380,12 @@ private static void insertCleanupPreset(Map<String, Object> storage, CleanupPres
}

public FileHistory getFileHistory() {
return new FileHistory(getStringList(RECENT_FILES));
return new FileHistory(getStringList(RECENT_DATABASES));
}

public void storeFileHistory(FileHistory history) {
if (!history.isEmpty()) {
putStringList(RECENT_FILES, history.getHistory());
putStringList(RECENT_DATABASES, history.getHistory());
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_da.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=&Indsæt
Preferences=&Indstillinger
Previous_tab=&Forrige_faneblad
Quit=&Afslut
Recent_files=&Seneste_filer
Recent_databases=&Seneste_filer
Redo=&Gentag
Replace_string=&Erstat_streng
Save_database=&Gem_database
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=&Einfügen
Preferences=&Einstellungen
Previous_tab=&Vorheriger_Tab
Quit=&Beenden
Recent_files=&Zuletzt_geöffnete_Dateien
Recent_databases=&Zuletzt_geöffneten_Datenbanken
Redo=&Wiederholen
Replace_string=E&rsetzen
Save_database=Datenbank_&speichern
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=&Paste
Preferences=&Preferences
Previous_tab=&Previous_tab
Quit=&Quit
Recent_files=&Recent_files
Recent_databases=&Recent_databases
Redo=&Redo
Replace_string=&Replace_string
Save_database=&Save_database
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=&Pegar
Preferences=&Preferencias
Previous_tab=&Pestaña_anterior
Quit=&Salir
Recent_files=Bases_de_datos_&recientes
Recent_databases=Bases_de_datos_&recientes
Redo=&Rehacer
Replace_string=&Reemplazar_cadena
Save_database=&Guardar_base_de_datos
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_fa.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=چسباندن
Preferences=پیکربندی
Previous_tab=سربرگ_قبلی
Quit=خروج
Recent_files=پرونده‌های_اخیر
Recent_databases=پرونده‌های_اخیر
Redo=دوباره_انجام_دادن
Replace_string=تعویض_رشته
Save_database=ذخیره‌ی_پایگاه_داده
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=C&oller
Preferences=&Préférences
Previous_tab=Onglet_&précédent
Quit=&Quitter
Recent_files=Fichiers_&récents
Recent_databases=Fichiers_&récents
Redo=&Répéter
Replace_string=Remplacer_la_c&haîne
Save_database=Enregistrer_la_base
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_in.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=Tempelkan
Preferences=Preferensi
Previous_tab=Tab_sebelumnya
Quit=Keluar
Recent_files=Berkas_terkini
Recent_databases=Berkas_terkini
Redo=Jadi_lagi
Replace_string=Ganti_string
Save_database=Simpan_basisdata
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=&Incolla
Preferences=&Preferenze
Previous_tab=Scheda_&precedente
Quit=&Uscita
Recent_files=File_recen&ti
Recent_databases=File_recen&ti
Redo=&Ripeti
Replace_string=&Sostituisci_stringa
Save_database=&Salva_database
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=貼付け(&P)
Preferences=設定(&P)
Previous_tab=前のタブ(&P)
Quit=終了(&Q)
Recent_files=最近開いたファイル(&R)
Recent_databases=最近開いたファイル(&R)
Redo=再実行(&R)
Replace_string=文字列を置換(&R)
Save_database=データベースを保存(&S)
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=Plakken
Preferences=Instellingen
Previous_tab=Vorige_tabblad
Quit=Afsluiten
Recent_files=Recente_bestanden
Recent_databases=Recente_bestanden
Redo=Herstellen
Replace_string=Tekst_vervangen
Save_database=Database_opslaan
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_no.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=&Lim_inn
Preferences=&Oppsett
Previous_tab=&Forrige_tab
Quit=&Avslutt
Recent_files=&Siste_filer
Recent_databases=&Siste_filer
Redo=&Gjenta
Replace_string=&Erstatt_streng
Save_database=&Lagre_database
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=&Colar
Preferences=&Preferências
Previous_tab=A&ba_anterior
Quit=&Sair
Recent_files=Arquivos_&recentes
Recent_databases=Arquivos_&recentes
Redo=&Refazer
Replace_string=&Substituir_string
Save_database=&Salvar_base_de_dados
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=Вставить
Preferences=Пользовательские_настройки
Previous_tab=Предыдущая_вкладка
Quit=Выход
Recent_files=Недавно_открытые_файлы
Recent_databases=Недавно_открытые_файлы
Redo=Отмена
Replace_string=Заменить_строку
Save_database=Сохранить_БД
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_sv.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=Klistra_in
Preferences=&Inställningar
Previous_tab=Fö&regående_flik
Quit=&Avsluta
Recent_files=Senaste_&filer
Recent_databases=Senaste_&filer
Redo=&Gör_igen
Replace_string=Ersätt_sträng
Save_database=&Spara_databas
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_tr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=Ya&pıştır
Preferences=&Tercihler
Previous_tab=Ön&ceki_sekme
Quit=&Kapat
Recent_files=Son_kullanılan_dosyala&r
Recent_databases=Son_kullanılan_dosyala&r
Redo=Y&inele
Replace_string=Dizgenin_ye&rine_koy
Save_database=Veritabanını_&kaydet
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_vi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=Nhập_vào
Preferences=Tùy_thích
Previous_tab=Thẻ_trước
Quit=Thoát
Recent_files=Các_tập_tin_gần_đây
Recent_databases=Các_tập_tin_gần_đây
Redo=Làm_lại
Replace_string=Thay_chuỗi
Save_database=Lưu_CSDL
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/l10n/Menu_zh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Paste=粘贴_(&P)
Preferences=首选项_(&P)
Previous_tab=上一标签页_(&P)
Quit=退出_(&Q)
Recent_files=最近打开的文件_(&R)
Recent_databases=最近打开的文件_(&R)
Redo=重做_(&R)
Replace_string=替换字符串_(&R)
Save_database=保存数据库_(&S)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public class FileHistoryTest {
@Before
public void setUp() {
prefs = JabRefPreferences.getInstance();
oldFileNames = prefs.getStringList(JabRefPreferences.RECENT_FILES);
oldFileNames = prefs.getStringList(JabRefPreferences.RECENT_DATABASES);
}

@After
public void restore() {
prefs.putStringList(JabRefPreferences.RECENT_FILES, oldFileNames);
prefs.putStringList(JabRefPreferences.RECENT_DATABASES, oldFileNames);
}

@Test
Expand Down Expand Up @@ -65,7 +65,7 @@ public void testFileHistory() {
fh.removeItem("aa");
prefs.storeFileHistory(fh);
assertArrayEquals(new String[] {"ii", "hh", "gg"},
prefs.getStringList(JabRefPreferences.RECENT_FILES).toArray(new String[0]));
prefs.getStringList(JabRefPreferences.RECENT_DATABASES).toArray(new String[0]));
}

}

0 comments on commit c1215c8

Please sign in to comment.